Ummmmm, development costs of New Super Mario Brothers vs Mario Galaxy 2 are a drop in the bucket when you consider the total revenue generated by each game; one might have cost 15 million, the other 5 million; but the revenue generated by each title is in the hundreds of millions. This money is used to pay the workers and maintainers of Nintendo's manufacturing plants, the R&D, advertisement, investments, and share holders.
The value of an item is simply what the buyer is willing to pay for it. New Super Mario Brothers seems to be better priced than Mario Galaxy 2, since demand for the game was MUCH higher.
New Super Mario Brothers sold 21.5 million copies
Mario Galaxy 2 sold 6.2 million copies
What this means is that more people thought NSMB was worth the price than those who thought Mario Galaxy 2 was. In this case, 2D games are more valuable than 3D games, even though the dev costs for the 3D games are higher.
I describe myself as a little dose of toxic masculinity.