Why do I get a 'No Access-Control-Allow-Origin' header is present on the requested resource error in JavaScript, but not in Postman?

I’m connecting to a Flask-based RESTful API using JavaScript, and I keep hitting the ‘No Access-Control-Allow-Origin’ header is present on the requested resource error. However, the same request works just fine in Postman. I understand this is related to CORS, but why does the browser enforce this while Postman doesn’t? What’s the technical reason behind this behavior difference?