I don't recall macos forcing it. They definitely over-suggest it and the ecosystem (especially for dev) is very full of it and I consider that a problem, but it's limited in scope. If you don't want the Apple ecosystem, as far as I know you never need an AppleID.
I had to make one to download Xcode from the store. I couldn' figure out a way around it, but admittedly I have about 4 hours of macos experience.