The main purpose of port scanning is to find out as much information as you can on the target in order to see if there's any known vulnerbilities - correct?? For instance, in the example below. I learn that pcanywheredata uses port 5631 to communicate. So my goal would be to look for known exploits with PC Anywhere. Is this the main purpose of port scanning?

ort State Service
21/tcp open ftp
23/tcp open telnet
25/tcp open smtp
80/tcp open http
110/tcp open pop-3
139/tcp filtered netbios-ssn
443/tcp open https
513/tcp open login
1025/tcp open NFS-or-IIS
1026/tcp open LSA-or-nterm
1027/tcp open IIS
3372/tcp open msdtc
5631/tcp open pcanywheredata

Thank you.