There are 65535 possible ports. The only way to know which ones are open is to send requests and parse the answer. Depending on the network, the response can arrive quickly or not. If it takes too long for a response, the scanner may specify a time-out duration at which point the port is simply deemed closed.
“Fast” port-scanners either have a ridiculously short time-out, only scan common ports, or both. We take a pragmatic approach, which means we scan common ports first and display those results right away. Then we have a thorough sweep across the entire port range specified (use configurable). This takes time if the targeted device has a network interface configuration which does not respond immediately to portscan probes.