Although I only had two customers (just one of which generated revenue), I like to think I can legitimately trace my entry into the software business all the way back to when I attended high school. Even as a one-man-band, I took care of many business challenges familiar to much larger enterprises: engineering and QA (I wrote and tested the software), marketing (I had brochures, a presentation pitch, business cards and letterheads) and sales (I held seminars, followed up with on-site demos and closed the deal). I even handled post-sales support, and generated a little PR (receiving coverage in my local paper, etc.).
My "product" helped school libraries handle indexing and cataloging of their book collections. For its time, it seemed pretty innovative. In the mid-80s in the UK, BBC microcomputers were quite commonplace in schools, and many of them ended up in the libraries. But at the time, all book indexes were based on paper cards, and school librarians were not very technically savvy. They would manually type out book details on cards (using a typewriter), often typing multiple cards for each new book (one for the subject catalog, one for the author catalog, and sometimes one for the book title). Browsing through a stationery catalog (my parents owned their own printing business -- we had things like that lying around the home), I noticed index cards on a big spool with perforated sides, suitable for feeding through a school printer (back then, dot matrix and daisy wheel printers were commonplace). So I wrote some software to enable the librarian to type book details once, and the application would automatically handle layout and printing of multiple index cards. This was a big time saver for the librarian, and I could have stopped there. But going further, I created a database of the book details (adding a simple query interface), allowing books to be searched online. This gave the library an on-ramp to a digitized index, while maintaining physical card indexes during the transition.
My first customer was my own school. I worked with the librarian on UI and feature requirements, so it seemed fair not to charge them for the software. They became my "reference customer", and my entry point to the local user group of school librarians. I knew that I didn't have the ability to market to, sell to or support customers more than a few miles than where I lived, so these were my primary prospect pool. One of them represented a prestigious local school that was well-funded, and they became my first (and only) revenue-generating customer.
While I wouldn't always concede it at the time, the point of the exercise was not to launch a viable business. I started on the path because of an urge to be helpful, creative and innovative (from a programming point of view), and over time moved my perspective into what might be a useful customer-facing and commercially focused experience. It helped me realize that I wouldn't be satisfied following a purely technical or research-based career path, and that I should look to getting involved in the broader aspects of running a business.