I'm new to poker and my question is why hands like Ace Ace, King King, Queen Queen, are the best starting hands? How was that established to be true? They are easily be beaten by a straight, for example.
These hands and others are all ranked on their expected value (EV). Hand rankings is a complex and complicated subject. Doing a search on "Poker Hand Rankings" on google will return a lot on the subject.
There are a lot of different ranking systems that vary for different game variables. Large Pairs for example tend to have a better EV when there are less players in the pot, hands like AK and smaller pairs have a better value when there are more players in the pot. The EV of some hands change from positive to negative, go up and down, depending on rather or not the game is limit or no limit, the size of the blinds, if antes are involved,the number of players seated at the table and even the skill level of those players relative to yours. Even the best hand rating chart, or explanation why some hand is better then another, is a very basic starting point that a player will deviate from correctly the more experienced and proficient that player becomes at the game.
Understanding when to play a hand, that is reflected in basic hand ranking charts, and how to play a hand (betting strategies), are the two basic pillars of poker that cover almost all you will ever learn about the game.
It's based upon the equity those hands have against a random hand (or specific ranges of hands). You can check specific hand equities with tools like ProPokerTools.
You'll see for example that for
AA will have the best hand on the river 81.29% of the time,
JT will have the best hand 17.99% of the time (and they will chop the other 0.72% of the time).
You can find examples which illustrate this for the entire set of possible starting hands here:
Ultimately this is only one measure of the value of a hand though and there are other factors which contribute to overall hand strength or whether you would want to play a particular hand in a certain way in a given situation. Equity calculations like this only show the absolute value of the hands if the hand goes to showdown and there is no further betting, ignoring considerations like implied (and reverse-implied) odds, bluff equity etc.
Easily beaten by a straight? You only get a straight by the river from connectors 8.5% of the time.
AA is a 4:1 favorite over 78.
There are only 169 unique starting hands
pairs = 13
unsuited = 13 * 12 / 2
suited = 13 * 12 / 2
= 13 + (13*12) = 13*13 = 169
They just run those 169 hands against all random hands and all boards. Believe it or not a known hand against just one random hand is 59,908,765,316,400 runs.
If the opponent has been ranged then less hands to run.
Some equity calculators use a Monte Carlo simulation to reduce the number of runs.
Many equity calculators store the results of common expensive calculations.
Some analyze hands for actual profit. For example 86s has low equity but when it hits can typically get bigger payoff because it is disguised. And if you don't hit a piece of it you release early.