I don't think the argument applies to all software. For any given implementation, there are arbitrarily many alternative implementations that are functionally equivalent. You can't copyright the function, but you can copyright the implementation.
What distinguishes an API is that it is by definition the unambiguous formal specification of the implementation's function. A function can only be used if the provider and user of the interface agree. Once one side is established, it removes all opportunity for creativity from the other. If the library provides "sort(container&, iterator start, iterator end)" then that's how the user has to call it; you have no choice. And if the user code calls it that way then every library implementation must implement it that way.
APIs are in a bit of a curious situation in that making them can be a creative activity but then the act of specifying them makes the specification functional. But if you think about it, it isn't really all that novel. It happens anywhere you have an interface between functional components of anything -- you can make the interface decorative, but you can't use that to exclude competitors from the market, because by incorporating what would otherwise be decoration as a necessary part of the interface, you make it inherently functional. You can't exclude competitors from making screw drivers compatible with your screws (or screws compatible with your screw drivers) just by using an arbitrary new screw head and then trying to claim copyright over it. (Naturally utility patents are a different animal.)