Peter DeLorenzo, blogging over at The Autoextremist, makes the bold and blunt accusation that Hyundai purposely tweaked their calculations so they would claim 40mpg on several vehicles, for marketing purposes.
I'm not sure I would put that over on Hyundai. They aren't some Chinese striver, desperately trying to break into the western market, packing their stuff with melamine and lead. Hyundai is a serious, and very successful company, and they know full well the marketing damage and bad press that would come from cooking the numbers. They were also aware that the EPA spot-checks fuel economy and emissions certification claims with their own testing.
No serious automaker would risk an embarrassing public EPA scolding, fines, and class action lawsuits to get from 38mpg to 40mpg, the risks are too great.
I have huge respect for DeLorenzo's opinion, but I think he's just flinging mud here.
My theory is that Hyundai's engineers either mis-interpreted the test procedure for fuel economy, with regards to the dynamometer setup, or perhaps messed up their testing methodology for obtaining some aspect of the road load calibration such as the air drag coefficient or road friction term. Since the error was in their favor, they didn't challenge their results. You can bet that if Hyundai was getting 36mpg instead of an expected 38mpg, they would have reviewed their procedures very closely.