Partially correct. This isn't a Unix-only thing. It is a TCP/IP
standard network protocol thing. So, any operating system using the tcp/ip networking protocol suite should exhibit the same behavior, including Unix systems, Windows systems, Android systems, Apple systems, and any others using the tcp/ip network protocol, where tcp and udp are the ip network standard packet styles. At this point, it would be very easy to go down the slippery slope of the protocol definitions and what they mean for the functionality of any program trying to communicate with another program using tcp/ip, but I'll refrain, as we may get lost before addressing the primary question. So, at the risk of oversimplifying parts of it, let me try it at a high level.
Think of the IP address of any device as the address of a very large apartment building, and people in the apartment building with different addresses can communicate with people in the other apartment building only via mailboxes assigned to each person in their respective building. These mailboxes are equivalent to the ports you mentioned, but it gets a little more complicated when you find out that to keep conversations straight, each mailbox can have only a single connection during a given conversation. So, some more elaborate mechanism must be employed if the person that everyone wants to communicate with is going to be able to handle multiple simultaneous conversations. This is the situation faced, for example, when two (or more) tablets running AvareX want to communicate with an ADS-B receiver (like a Stratus or a StratuX device) at the same time. It's really important to note, in this example, that the respective communication endpoints must have their own apartment house address (IP address), because that's how the person/program keeps track of who they are talking to within a given conversation. To accomplish multiple conversations with multiple addresses, both parties initially negotiate over the primary contact mailbox (port address) that they will carry on their conversation using an unused mailbox, or port address (the IP protocol allows for 65535 ports per IP address) that will be allocated just for that person/program's conversation. So in this example, port 4000 is a universally known initial contact port for a conversation connection (the 1st tablet), which immediately gets negotiated to some other port/mailbox for the duration of that conversation, leaving port 4000 again available to handle the negotiation of another connection request from the 2nd tablet. Thus, the two tablets have initially only been given the the initial contact port number, but their respective conversation with the ADS-B receiver actually takes place over a port they negotiated duing their inital contact conversation.
So now let's complicate it a bit and suppose that one of those tablets tries to use two different programs who have each been given the same initial contact port on the ADS-B device, like running legacy Avare and AvareX at the same time on the same tablet. Remember I said 'it's really important to note, in this example, that the respective communication endpoints must have their own apartment house address (IP address), because that's how the person/program keeps track of who they are talking to within a given conversation. In this case, both programs requesting a conversation would be using the same IP address. So to keep its conversation straight, the ADS-B receiver will only permit the first requester to connect, and will refuse port 4000 connection requests from all others at the same IP address, because it has determined that it already has an open conversation with someone at that address. The 1st conversation will have to terminate in order for the 2nd one, with the same ip address, to be able to progress.