One company that I did was basically a hobby gone way overboard. I was interested in a particular type of technology, and ended up with company to sell/train/install/etc in that industry.
Another time, a friend asked me to build them a POS system. Then they recommended me to another friend, and then again. Soon I realized that most affordable POS software for small businesses sucked, so I put several elements together into an affordable networked POS package of my own.
One of the things I'm developing now is along the lines of an XaaS (X as a Service) play to an industry that is another hobby of mine.