Contrary to what you may believe, the market has failure modes. Just because something is difficult to monetise doesn't mean that it's not valuable. Fundamental research is one such thing. It can open up vast realms of possibility for all of humanity, but in a way that's difficult, if not impossible, to privatise. And the benefits may take years, decades or even centuries to pay off. Thus there is very little incentive for any market actors to invest in them.
But if Newton had decided to open an inn instead of work on the Principia the world would have been far worse off for it. Possibly centuries behind where we are now.
I will apologise for calling the restaurant mediocre. I have no idea about the quality of the food, but if you think that's what this hinges on then you've missed the point. That as good a restaurant as it may be, it's not worth losing a mathematician of his calibre over.