Stateful filtering is used to track the origin of a request and this can be used to automatically allow the reply to the request to be returned to the originating computer.
For example, a stateful filter that will allows inbound traffic to the TCP port 80 on a webserver will allow the return traffic, usually on a high numbered port to pass through the stateful filter between the client and the webserver.