Congress at the time did not like how the courts were ruling in favor of the then fledgling CATV services. Courts ruled that capturing and sending the shows to cable viewers was not a violation as were not acting as "performers". Congress changed that they were, effectively stopping cable from providing local and regional channels. Well Congress showed who was truly doing this by adding in all sorts of new compulsory fees for carrying local channels. So CATV can and in some cases has to carry local content and pay for it.
TL;DR
Congress changes to Copyright in 1976 at the behest of broadcasters versus CableTV is the basis for the ruling. The original broadcaster owns all rights unless otherwise assigned.
The opinion compares Aereo's use of tiny antennas to cable companies' use of one big one. They argue that since Congress passed a law back in the '70s to define the cable companies' practices as rebroadcast, that law should be read as also defining what Aereo does as rebroadcast.
IANAL, but felt like the DVR functionality really clouded the case and possibly skewed it away from Aereo. Harder to claim you are merely an antenna when you are recording, too.
When I look at their offerings, I can immediately see that they're selling a streaming TV service and it just happens to be implemented by receiving radio-frequency broadcasts. Supreme Court justices aren't idiots, and they can probably see that too.