This is the default.
But this does not answer the question. Ok, everyone all agrees to play D&D 5E and if you must have the limited focus game, everyone agrees to do the Undead Army Story Plot. Ok: everyone agreed to that.
So your example was the players....just randomly say "ok day...we want to buy an inn and run the inn and do all sorts of inn related stuff". So.....then the players are wrong to "just do this in a game, right?" I mean it's one thing to show up on game night and call a Special Meeting to say "we the players with to officially declare that we will stop playing D&D 5E and now wish to play Inns and Outs, the Hospitality Management RPG!" But for the players to just buy and inn, or take any other such "side" action in the game is WRONG. Right?
So the DM is 100% right when the messenger shows up with the "ok, lets forget about your dumb inn and get back to the game....the undead army as been spotted near the coast"