What you describe actually is an option. This a reason that everyone is encouraged to run relays themselves. It increases how hard it is. Even if there is parties with bad intentions, when they don't work together it actually benefits the network. Making it harder to create a relay puts a smaller group into power, which again makes it easier for an attacker to bring up the resources required to successfully attack Tor.
In the end current systems to protect privacy raise the barrier to successfully compromise your anonymity, so an attacker needs more and more resources. With every new relay and especially with every new "good" relay it gets harder and harder for an individual user to be successfully attacked.
From the Tor FAQ:
[...] it is possible for an observer who can view both you and either the destination website or your Tor exit node to correlate timings of your traffic as it enters the Tor network and also as it exits. Tor does not defend against such a threat model.
In a more limited sense, note that if a censor or law enforcement agency has the ability to obtain specific observation of parts of the network, it is possible for them to verify a suspicion that you talk regularly to your friend by observing traffic at both ends and correlating the timing of only that traffic. Again, this is only useful to verify that parties already suspected of communicating with one another are doing so. In most countries, the suspicion required to obtain a warrant already carries more weight than timing correlation would provide.
Furthermore, since Tor reuses circuits for multiple TCP connections, it is possible to associate non anonymous and anonymous traffic at a given exit node, so be careful about what applications you run concurrently over Tor. Perhaps even run separate Tor clients for these applications.