If both versions would load the same initialization file they should look the same way, right?
No, not right. Both of the versions can load the same initialization file, but in spite of that still look different.
How could it be? The reason for this is the fact that although all Emacs versions load the same initialization file looking for it in same places and in same order, different versions can come with different default values not addressed by the initialization file. In addition to that different Emacs versions store the theme files in different folders. To see it yourself you can use locate
with the name of one of the themes coming packaged with both versions like for example the adwaita-theme:
~ $ locate adwaita-theme.el
/usr/local/share/emacs/28.2/etc/themes/adwaita-theme.el
/usr/share/emacs/27.1/etc/themes/adwaita-theme.el
In other words, your assumption that Emacs 28.2 does not load the initialization file is wrong. It does load it as you can see from the non-standard font-face shown in both windows, but ... it can't find the custom theme you provided for the version 27.1 because it is not stored in the folder the version 28.2 checks for themes. This is the actual reason for the different colors of the background.
To solve the problem with not the same background color in both windows copy the themes present in the 27.1 folder over to the themes folder of version 28.2. With this done the windows started one after another will look like:

You can see that now the background color of both windows is the same what shows you that Emacs 28.2 has loaded the initial settings from the ~/.emacs file.
Why there are still differences in the layout of both windows is out of scope here as the main issue addressed by your question is solved by revealing the reason why you erroneously assumed that the initialization file is not loaded by the other Emacs version.
And please be aware that if you modify the theme in one of the Emacs versions it will not be mirrored in the other one, like it is the case if you modify the settings in the ~/.emacs initialization file.
user-emacs-directory
? Have you set aHOME
environment variable?user-emacs-directory
? M-x user-emacs-directory does not work ...C-h v user-emacs-directory
.(defvar user-emacs-directory ;; The value does not matter since Emacs sets this at startup. nil
LOL . Isn't it weird? Help says the variable will be set there to ` ~/.emacs.d/`. The script tells it doesn't matter ... WHAT of this is now really true???