For the same reason that it can make sense to say that python is more powerful than C, even though you can obviously do more things with C than with python. Xdotool lets you send keystrokes to a particular window, even if it's not in focus. You can do that with ydotool if you also do some sway IPC, but it's not as convenient, and no one has made a higher-level tool, possibly because it would be a nightmare to make it work with multiple different compositors.
Do you know if there's any standardization effort to support xdotool-like functionality over wayland with some kind of actual security model (using ydotool kind of subverts the security improvements wayland offers unless one does more due diligence than is pleasant to do for quick scripts)