Manufacturers do their own testing per EPA rules and provide the data to the agency. The EPA only samples a small number of vehicles each year to verify the manufacturer results.
The test cycles used to calculate the fuel economy numbers are based on very conservative driving behavior. For example, the rate of acceleration is specifically determined in each cycle and even a % for idling time is factored in. Only one of the tests considers if the AC is on and accounts for just 10 minutes of the complete 95-ish minute cycle of tests.
Making comparisons with someone else is basically pointless. There are too many variables for why one driver can meet or beat the numbers and another is dismally low. How quickly the vehicle is accelerated, the terrain, temperature, wind, fuel blend/quality etc are just a few.