I was searching the reason behind CORS disabling on browsers by default. I thought i found an answer with an example in an old post
Why is CORS without credentials forbidden?The main concern here is access control based on network topology. Suppose you run a HTTP service on your home network (in fact, you almost certainly do, if your router itself has a Web interface). We'll call this service R, and the only machines connected to your home router can get to the service. When your browser visits evil.example.com, that site serves your browser a script, telling it to fetch the contents of R and send it back to evil.example.com. This is potentially bad, even without credentials, because it's a violation of the assumption that no one outside your local network can view the services running inside your local network. The same-origin policy stops this from happening.
then I actually read an observation about CORS mechanism that sounds fine
Why is CORS Disabled by Default?CORS is based on the response headers returned from the API. It is not the API that rejects responding to the request, the web browser explicitly disallows handling the response. The API will process the request as normal.
Thus my doubt about the first quoted "example": since enabling CORS is done trough setting the right headers(Access-Control-Allow-Origin, ...) into server responses, what kind of protection would be if to bypass it, "evil.example.com" simply has to "set the headers into his responses to enable CORS on the client"?
If so, is there any other simple example on why CORS is disabled?