To use an API over a network connection (as opposed to, e.g., the Windows API), a user communicates a request to the API host, or server, and awaits a response. The host of the remote API can refuse to serve requests from users for probably any reason.
Such services often require users to accept a license as a condition of using the service, and they may charge a fee as a condition of the license.
A license to use a service is obviously not necessarily bound to a license for the use of its source code, just as the ability to reach the service is not dependent on the ability to see (let alone use) the code in any format, whether it be the source code or some compiled form of the code.
In essence, source licenses and service licenses have different primary goals, at least inasmuch as the source license seeks to restrict someone who has actual physical access to compiled code, and possibly source code. Service licenses do not have that concern, though I have seen service licenses that also prohibit decompiling. This is probably the result of a CYA attitude among lawyers: the language is already in the standard software license text, and it doesn't hurt anything to leave it in, and it could help if a service user somehow managed to download the program code.