Not just the IPO. Being public at all subjects you to the perverse and destructive incentive of needing to maximize shareholder value. Just because some private companies take VC funding (and subject themselves to analogous forces) doesn't mean that's required or expected.
Needing to maximize shareholder value is a myth. There is no law that requires you to do that - people like to use the idea as an excuse to do scummy business.