Both in terms of the risk and cost of production to the companies who make them and in terms of average value to the consumer considered over a long period of buying AAAs, $40 is a very low price. $40 is the cost of a couple DVDs. Or two and a half 12 packs of reasonable quality beer. Historically, video games have been considerably more expensive than they are today as well.
I don't see how you can value a media product without taking into account the amount of entertainment it provides. In the case of AAA games, this is often quite a lot. The fact that it sometimes isn't brings down the average, but does not undermine the overall analysis: today's AAA games provide a very economical source of entertainment relative to other media products and historical video games going back decades. And let's not even get into comparisons with other popular hobbies...