Well that is often the issue. Many DMs and Worldbuilders use "lore" to recreate a feeling that would be better played using a different system or with heavy houserules.
D&D is a game. If your lore doesn't support a fun game and breaks the agreement that the player get to make their own PCs, it's not good lore for D&D.
The DM gets to make whatever lore they want. It however doesn't insulate them from being called out on disruptive lore.
Pirates of the Caribbean, Spelljammer, and Iomandra have swashbukling themes but vastly direct lores and PC options.
Ah, the dreaded nefarious "Many DMs". That explains everything!
First, I don't know who these many DMs are, nor do I really care. People running games of their own style and with heavy house rules has been a part of D&D since it's inception. The fact that people can, and do, run very different styles of games using D&D as a basis is a strength of the system not a flaw. It's one of it's reasons for the games ongoing popularity.
I do agree that a game that is not fun will not be fun. However you're trying to make a connection between restrictions based on lore for a campaign making it automatically being a bad game. That connection does not inherently exist and you have proven nothing. If someone asks me to join a D&D game that is set in a non-magical world with only humans as PCs, I'll have some questions about details. I might still join if it sounds interesting, especially if they've run a good game previously. I would probably be more hesitant if they also had a 20 page double sided document of house rules but that's a a red herring and a different topic. Tons of house rules work for some people, not sure it would work for me.
A DM should always be open to feedback of course. Sometimes the answer will be "no" in my game because I accepted long ago that I can't be the right DM for every player, just like I'm not the right player for every DM. It has little or nothing to do with how enjoyable a campaign will be as well. I've had games that had every option available that were utter crap because there was no lore or grounding for our characters and no thought put into the campaign. In general if a DM has some restrictions that make sense to me it's a positive sign, they've put some thought into the game and what's going to be fun for the players as a whole.
Last, but not least, you can have multiple themes to support lore. Swashbuckling is
one theme behind the stories you mentioned but it's hardly all inclusive. There's a big difference between 18th century Caribbean with ghosts and real world legends theme and
pigs PCs in space themes. Themes can be additive, they aren't always mutually exclusive.