It wasn't about the shape.
This particular court case actually _was_ about the shape. This registered one:

In fact, a rounded rectangle was the very first item on Apple's claimed list of similarities:
- i) A rectangular, biaxially symmetrical slab with four evenly, slightly rounded corners;
- ii) A flat transparent surface without any ornamentation covering the entire front face of the device up to the rim;
- iii) A very thin rim of constant width, surrounding and flush with the front transparent surface;
- iv) A rectangular display screen surrounded by a plain border of generally constant width centred beneath the transparent surface;
- v) A substantially flat rear surface which curves upwards at the sides and comes to meet the front surface at a crisp outer edge;
- vi) A thin profile, the impression of which is emphasised by (v) above;
- vii) Overall, a design of extreme simplicity without features which specify orientation.
Basically, the judge said that the front shape was nothing new, and thus the sides and rear were more important to the case. As Samsung's tablets were thinner and had a totally different back, he ruled that Samsung did not infringe.