Personally, we are building a company[1] to have an impact. Profit is part of that, since how large of an impact is correlated with the number of customers we can serve which requires certain fixed costs (e.g. salaries.) Profits also allow a company to weather market fluctuations and be free of the hype-cycles of investors.
The product or service are equally means to an end. Building a CRM for local government isn't a goal in or of itself. We don't win when the code is shipped or even when the customer buys it, only when we affect change on the world.
The one thing required to do that is people. And not just anyone is passionate about empowering public servants (which is pefectly fine.) So, in fact, creating a great place to work _is_ one of the few things we build the company around.
At the end of the day, it all comes back to human happiness. Not the spurts of dopamine from Candy Crush or Snapchat, but real fulfillment. (Check out our values[2] and employee handbook[3] for how we put that into action.)
When I was younger, my dad used to always ask me, "What is your goal in life?" I'd say stupid things like a Ferrari or a big house and he would ask "Why?" Because I wanted to drive fast or have room for toys and video games. "Why?" And so on...
All of those "Why"s led to one answer: My goal in life was to be happy. Everything else is a means to that end. That's why a few of the things I listed in the original comment had little to do with product or profit. Build something you're proud of, for no other reason than that you have to live with yourself. Do the right thing. It's harder, but you'll make people, most of all yourself, happy.
And if you die in 30, 40, or 2 years having made a bunch of people happy, I think that sounds pretty great.
[1]: http://seneca.systems [2]: http://seneca.systems/values [3]: https://Github.com/senecasystems/employee_handbook
[EDIT] - added a story from my childhood