Why on Flathub it says that it “uses legacy windowing system”, but there is granted permission to use Wayland socket in manifest?
No, its certainly not because of that.
Many apps have both permissions simultaneously and theres no warning. In this case X11 is used as a fallback if wayland is not used.
In this case X11 is used as a fallback if wayland is not used.
It prefers X11, and Wayland can be enabled through the ozone layer.