Of course anyone knows that a hand like AA is better that a hand like 22. That is the obvious part of the starting hands and the questions is not posed when talking about extremes, it is posed when we are dealing with middle hands that can get us often confused. It is possible that your pocket aces will loose against a worse starting hand. Why? Probably because you were playing against a lot of people and because they played other types of hands with bigger value in hold'em in this situation. It is important to know that hands hold a different value depending on each situation and that it can not be generalized. A good hand when many players are at the table is a hand like 8s9s. Sometimes people find it strange that hands like Ks7s are worse that a hand similar to 8s7s. This happens because they are not looking at all at the value of the hand itself, they are just comparing the numbers printed on each card.
Hands like 10-6s, Q-7s, J-7s, J-4s and K-7s are no good in hold'em. Why a hand like K-7s is such a bad hand is actually an obvious thing. Its chances of actually wining the pot are very low. How can it win actually? Well first you can hope for your king to hit. Not that it is that unlikely but think about it, even if it does hit then what? Then you have a very low kicker for your pair and that kicker will be easily beaten by another hand. Or, you can catch the 7-7 pair but it is a very low pair and most likely there will be other player in the game to top that hand. To get a flush you have low chances. For a straight you would need so many in between cards that it is practically impossible to be the only one with a flush. Two pairs will be possibly toped by a better hand. And so go all the draws for this weak hand. The idea is that if you hold this hand you should fold it or play only if you are in a position and a game that lets you play it very cheap.
Another type of bad starting hand is the Ax off suit when x is a middle card. Middle cards mean below 10 and above 5. The reason this hand is also crappy is quite simple. If the x is not one of the cards above 10 or below 5 them you can't draw for a straight. For a flush you can't obviously draw because the cards are off suit in the first place.
So caution when playing any of these hands. The books say they should not be played at all because they involve a great risk but some situation might arise when you need to play them, but be careful not to pay too much for this.