In a very basic nutshell when you start playing or listing servers your client connects out, which gets noted in the NAT database. Any further communication is then allowed back in which corresponds to this database. This is standard NAT behaviour. Since the server doesn't initiate any inbound connection first any inbound firewall isn't likely to affect this.
In short because your PC is connecting out first, the inbound firewall is irrelevant (in this instance - in others, more sophisticated firewall solutions can differ).
The "random port choosing" is also a design feature in IP communication. Whenever you connect to something you will get a known IP and port to connect to. This is why there are standard port numbers for certain services - such as DNS, HTTP, HTTP over SSL, SMTP, etc. - one end needs to initiate the connection first. However, the other end obviously needs a way of communicating back. A random, unused, port (larger than 1024) is chosen by your client and your IP and that port number is used by the other end to talk back to you.
You might benefit from learning a little more about general networking if you're interested in what's going on under the hood.