TCAS gets fairly accurate altitude information from the same source as the transponder. Thus any extrapolation from this information can yield a fairly accurate prediction of whether two aircraft may collide, and provide more certainty that changes in altitude will avert any conflict.
Range information is obtained by measuring the round trip time of the interrogation and response. This will also be fairly accurate.
Direction information is obtained by using the TCAS antenna to detect the direction of responses from other aircraft.
These values are then extrapolated to provide an expected path of other aircraft. Most airliners are required to use TCAS II which only provides the vertical guidance. TCAS III was envisioned to provide horizontal guidance as well, but:
it was judged by the industry to be unfeasible due to limitations in
the accuracy of the TCAS directional antennas.
Even if TCAS can be accurate to 3 degrees in direction, this translates to over 300 feet of uncertainty at 1 nmi.
TCAS IV was planned to use more accurate GPS information, but with ADS-B becoming more widely adopted, this development was stopped in favor of some future system that can use existing ADS-B technology.
Another point is that airplanes are generally larger in the horizontal plane than the vertical, and thus would need to change course more horizontally to avoid collision than they would need to vertically. Especially as planes get larger, they also tend to be more maneuverable in pitch than in turns.