By selling more-basic fare tickets that don't allow access to the overhead bin. Or, more accurately, by getting additional baggage check fees from folk buying more-basic fare tickets (and, over time, normalizing pricing on the more-basic fare tickets, so that tickets that let you actually use the overhead bin are more expensive).
I am very glad I don't have to run an airline and think of new and exciting ways to squeeze every penny possible. I am also glad I don't have to fly United these days.
United Airlines will charge extra fee for use of overhead bins
So now you’re stuck with either paying for a checked bag, or paying for a more expensive ticket to bring it on the flight with you.
+Dave Terhune.. This is asinine.