Different applications open different ports to carry out the necessary communication. For example, web servers (by default) open port 80 so that browsers can connect to it. It would be simple for someone to write a program that just did "open" calls on ports but the program wouldn't do anything. Crackers would be able to see the ports but they wouldn't be able to do anything with them either because they are really looking for the services to exploit that use the open ports.