Incorrect. Game lore is made to justify the rules, not vice versa.
Only Sith deal in absolutes.
Slightly more seriously, if you're creating your own campaign setting using a "toolbox" set of rules, there's absolutely room for going the other way. A while back, for a PF1 game I was thinking about running, I wanted to create a desert region famous for the fire elementalists that it produced (i.e. I came up with the lore first). Under the standard rules, there wasn't much to justify such a thing; a place full of monsters with fire resistance and fire immunity would likely produce more ice and water elementalists, since those monsters are vulnerable to cold damage.
What I did instead was tinker with the underlying game rules to justify the lore I'd come up with. I decided to change out monsters' having fire immunity to instead having degrees of fire resistance (a la an
old article by Sean K. Reynolds) and had the entire region be under certain
magic traits that augmented fire magic and limited/negated other types of magic (under the idea that if "dead magic" and "wild magic" are planar traits that can nevertheless be found in limited areas on the Prime Material Plane, e.g. in the Forgotten Realms, there's no reason other such traits can't be found).
The result was a region whose rules operated to justify the lore, and it worked out great...or at least it would have, if the group hadn't decided to go in a completely different direction, meaning that the campaign was never implemented. But the larger point is that you
can come up with lore first and then have the rules justify them; I see that as being one of the major benefits of a modular, "toolbox" approach, where you have a large amount of rules at your disposal, and so can make whatever lore you want first, mixing and matching the mechanics to implement that lore on a mechanical level.