Earlier quoted context omitted.
If it is a paid service other can now use the service while you pay the price. And the API might also expose data you don't want to expose to the public. That's why you never put these on the client side. There are better options, for example a proxy that injects tokens into the header.
Handing anyone your API key to use as they want is just asking for trouble. I'm shocked some people think that's an ok pattern to do...
E.g. Stripe has a publishable key and a secret key. The publishable key links the checkout session to a particular Stripe account, but you can't actually initiate a checkout session without setting a session ID from the server (which requires the secret key). If the 2 keys don't belong to the same account then the checkout session will fail.
Yes, with some services you can proxy requests via your own service. But how is this more secure? If anything you've just increased the potential attack surface.