As far as desktop computers are concerned, I think nowadays little-endian is nearly universal, but some big-endian hardware still exists.
Anyway, since there used to be different hardware, doing it "just like the hardware does" for communication wasn't possible.
So one choice was made for the communication protocol, and at each end the software was responsible to convert to host order (if necessary).
So we have htonl
and friends.