Is there a lore explanation why each setting might have different deities?


As far as I know, the multiverse of D&D 5E consists in different worlds all residing in the Material Plane, but the rest of the planes (Transitive Planes, Inner Planes, Outer Planes…) are shared between them.

Is there a lore explanation why each setting might have different deities? Since deities exist in planes other than the Material Plane, shouldn’t those deities be the same in every setting?