Packet size is important. If your ports are strings, every packet gets that much bigger. Nobody wants slow internet for programming convenience.
C# (.NET) could be the forerunner if only they had not gone with UTF16, but then it's only with hindsight that we can point out UTF8.
But if you're fine with fixed-length strings, you could just as well use all those bits to represent a number instead.