And I'm not sure business schools are a big help here. The vast majority of MBAs end up joining mid-sized to large existing companies as high flyers, and I think the curriculum aims to support that.
Anyway, why speculate? It's easy to find online articles and research showing why people have started their businesses, or the reasons why people would want to start one but haven't yet. Truth is that it's all the above and more.
Want to sell essential oils for me?
They didn't need to be intrigued by a problem or have a background that set them up to solve one. They decided to start a business and began by figuring out in what way their region was underserved, then built something to fill the gap. Voila.
There's no obvious reason this approach couldn't work in tech as well.
Just because your neighbors a welder, doesn’t mean you can whip out a materials inventory app for welders everywhere.
But two, I'd like to see some evidence that people really did entirely arbitrary things based on demand, without relation to other factors. If we look at a well-known example, the way Indian-Americans have dominated the motel industry, there's pretty clear evidence that wasn't just driven by looking around the neighborhood to see what was needed. E.g.: https://blogs.wsj.com/indiarealtime/2012/06/11/why-indian-am...
None of them told you that this is how they went about it, because it's a bad story.
Outside of tech, the standard entrepreneurship story is "I want to be my own boss; hmm, maybe I'll franchise a McDonald's".
It's only in tech that we end up equating entrepreneurship with things like innovation, solving brand new problems, etc. That's because the most successful tech entrepreneurs are the ones that did innovation (for the most part).
But that's not at all required - even in tech.
And just to be clear, I'm not thinking of Bezos as an example of small business owners. He's just the only person I've ever heard of who successfully said, "I'm starting a business. I wonder what it should sell?" As you say, I think he's an enormous outlier.