As per the title, I'd like to know the purpose of the com ports, since computers have physical USB ports as well. I've searched the web but without any convincing answer.
A traditional com port normally implemented RS-232 which is a rather simple serial protocol that according to the Wikipedia article dates back to 1969. It can be implemented using relatively simple logic that suited technology of the time. Downsides are that it operates at a relatively low speed and the protocol has no concept of identifiying a device and it's capabilities, so for example if you had an RS232 printer you needed to let the software side know both the kind of printer connected and the baud rate of the attached device.
The USB protocol came out in the mid-1990s and apart from operating at a higher speed introduced the idea of a device being able to identify itself both with a particular class, such as say HID (human interface device) for a keyboard along with a vendor and product ID so that a particular device driver could be loaded in the case of devices that needed device specific support.
The "plug and play" functionality came at the expense of much more complex logic that would have been impractical twenty years earlier especially for low-cost devices. But a PC doesn't really require a com port, and indeed as USB is becoming the standard for connecting peripherals many PCs and laptops ship with USB ports but no serial ports.
Keep in mind that personal computers and computers in general predate USB. Before USB, we also needed some type of ports to connect out peripheral devices to computers.
"Com" port is one of those ports. It's also much simpler than USB, so due to its simplicity it's still somewhat popular. It was also in use for many decades before USB became popular, so it became sort of standard and can still more or less work well with modern operating systems, unlike parallel ports that were also very popular at one time.
Some info about serial or com ports
An Asynchronous port on the computer used to connect a serial device to the computer and capable of transmitting one bit at a time. Serial ports are typically identified on IBM compatible computers as COM (communications) ports. For example, a mouse might be connected to COM1 and a modem to COM2. With the introduction of USB, FireWire, and other faster solutions serial ports are rarely used when compared to how often they've been used in the past. The picture shows the DB9 serial port on the back of a computer.
Why does a PC need it?
It doesn't. We may need it - the PC not!
Think of it like this: why do you we still need CD players while we all use iPods and MP3?
Well most of us don't. But some old devices don't have modern (affordable) USB alternatives, and if the old device with com port works, why replace it?!
To add to the answers above:
For certain applications, COM ports are still useful, but mostly in niche cases. For example it is possible to build a simple and cheap PIC microcontroller program using a COM port. In this example the port isn't actually used for RS-232, the control signals are manipulated in non-standard ways. As such it is not possible to use a USB to RS232 adapter because of the non-standard use.
However even these applications are becoming fewer and farther between. Because of the widespread availability and low cost of microcontrollers with USB slave capability, many programmers are now USB based natively. But if you want to make a USB programmer, you would still need to program the microcontroller the first time, so a COM port would still be useful.