Why, in Wayland, support of some basic features has to do with what DE or TWM you use? It is not like this in X11 and it seems there is more adherence to the UNIX philosophy in X11.
Because Wayland is a display service protocol. It's not responsible for secure message passing between desktop applications: that's the DE's business. Just because DEs used X11 as an insecure inter-process message passing agent doesn't mean it's a good design or even make sense.
There's no "Wayland" that could implement a generic way of handling input. Wayland is an extensible set of protocols with several implementations.
Handling input is an integral part of what a compositor does, and it's not an easy problem to solve when said input doesn't map linearly to text.
Input methods in particular are not something that X11 "solves" at all: Under X every toolkit implemented their own way of handling complex input methods. XIM existed, but it was limited and only there for compatibility with ancient applications.
There are Wayland protocols for complex input methods too. Gnome's gone all-in and integrated ibus with their own compositor, so that obviously works, but Gnome also benefits a lot from distributions like Fedora making sure it works: everything is set up correctly out-of-the-box if you use Gnome. However, more niche implementations like Sway have to deal with a lower level of integration because there's no distribution that's built around Sway to create a full desktop environment.
Wouldnt it be the other way around?
X11 isnt adhering to the UNIX philosophy because it does everything under the sun.
Wayland gives some tasks to the compositor.