Why do we need SOCKS if we could just use a TCP proxy system like TOR? What kind of advantages does SOCKS have?
SOCKS is a "pure TCP proxy".
The problem is that you need a standard way of telling the proxy where to connect, and that's exactly what SOCKS does.
Tor also uses SOCKS for the same purpose.
As stated by Grawity SOCKs is a proper proxy. SOCKs is/was used by major corporations and ISP to provide a single access point for internet data to pass through on otherwise major open networks.
These days ISPs tend to use transparent proxies and as routers have become much cheaper and more intelligent major corporations have been able to shift away from needing single point proxies in favour of self-managing networks and VPNs.
TOR has very little to do with the classic principle of a network proxy and is instead a network traffic anonymiser, routing your traffic through encrypted tunnels and making your traffic appear as if it came from somewhere else with the side effect that you can often bypass other access restrictions that may be in place such as firewalls and so on.
SOCKs and so on are not designed to "hide" your original location, that's just an occasional benefit (that is by no means certain to be anonymous), whereas TOR is designed to be anonymous with the benefit that it acts like a proxy.