Business was good in those days if you had an audience and could distribute your game to your customers more or less direct. Retail was very expensive, but if you were selling shareware your distribution costs were really low and you weren't giving anybody 30-50% of your take. Titles may not have sold i.e. 10 million copies back then, but you could make good money off a single game, and it was cheaper & faster to develop a game. The 'if's I just listed are pretty significant, of course.
For one example, Ultima 1 was developed by a couple people, sold for ~$40 USD, and eventually sold over 1.5m copies according to https://www.newspapers.com/article/austin-american-statesman... and other sources. So that alone probably made everyone involved in the game's development millionaires, even if the publisher took a huge cut.