No, publicly traded companies are beholden to act in the interests of the shareholders which in practicality is fairly vague. All companies are sort of designed to turn a profit or try to as they generally need that to continue existing but there is no legal requirement that they need to create a profit or maximize it, publicly traded or not. Obviously, companies do try to maximize profit as it makes everyone involved money but they don't have to.