API gateways are a response to a key outcome of the microservices architecture style: the proliferation of services and their interfaces. The core purpose of an API gateway is to simplify and stabilize the interfaces exposed to clients.
In addition to this, because of the unique position of an API gateway in the architecture, a variety of add-on benefits are enabled, like monitoring, logging, security, load balancing, and manipulation of traffic.