Your example only makes sense to you because you assume that the child could sell the diamond for enough money to buy the pie from you (or from someone else who has just as good of a pie) and have some left over. In the actual situation under discussion, there is no such option.
If that's not the case and you really would only part with the pie for that high of a price, and no other pie will do for the child, then what is there to complain about? How much do you think it costs to buy a pie made by, say, Gordon Ramsay? Feel free to replace with someone who is actually a good chef and not just a famous one if I made a poor choice.