Before I went with a straight cash-back card the card I used sometimes had sales in their rewards shop, so you could buy gift cards at a better rate than what cash-back would provide. So your premise that cash-back is always the most efficient is faulty. Even without sales, for many people cash-back is not fun, and rather than do math about what is more efficient they would prefer to have fun with their "reward".
The 'forced saving' aspect of my initial answer still holds, people might choose a less efficient reward redemption because they want to feel okay about spending money at a specific vendor. Thinking of rewards as "free money" is similar to the way some people think about tax refunds.
Edit: I misinterpreted the question, and particularly the quoted section to mean why choose anything other than a cash back card.
So, why would one ever choose credit that only can pay a specific
vendor?
My wager is that a lot of people who use co-branded travel rewards cards do so because it is a no-discipline way to save for vacations. Certainly you could just save 1-2% of all spending for vacations, but with rewards points the saving for travel
just happens.
Another factor is that travel rewards cards can offer other perks that, in conjunction with miles/points, could end up being more valuable than cash back. For example airline status, free upgrades, or free checked bags.
As for non-travel co-branded cards for some it's probably the same no-discipline saving for a specific store, but I bet a lot of people sign up due to a promotion (you can save $100 today if you sign up for the card), and never really evaluate whether or not they could be getting more bang for their buck with a different card.
Anecdotally, I had a card with pretty shoddy rewards for years because I was unaware that there were significantly better options and even a while after I knew there were better options because I didn't want to rock the boat on my credit score while buying houses. I have a decent card now, but I know I could save more by leveraging a few different cards that have benefits in specific categories, but I don't want to hassle.