I have been online since the early 90s and later on started looking for ways to earn a living online. I basically focused on ecommerce (selling things online) because I thought this was the only way that you can do it. I basically sold stuff in niche online communities.
By the late 90s I became moderately successful at this and decided to open a very small (basic) online store that I setup in an HTML editor which I eventually outgrew.
This required me to start looking for an ecommerce solution that can accommodate my needs. After trying a bunch of the paid programs, I stumbled across osCommerce (a free platform) but in order for it to fit my needs, I had to learn some basic programming (so that I could install add-ons).
I basically ended up liking this and just couldn't get enough of learning how to work with PHP, Javascript, JAVA and MYSQL. I eventually started building sites from scratch.
Of course along the way I had to learn on-page SEO so that my creations could get found a little easier in the search engines which lead to more curiosity about SEO in general.