How can Apple make it mandatory then?
Edit: I guess because Apple controls/owns the hardware and software
Not mandatory, just stock. Include it as the only messaging solution with the google package. oem's such as Samsung are free to use their own messaging apps. I don't see what the issue is, you get a PC and it has MS Edge installed as a browser, yet you are free to choose whichever browser you like.