I believe this is not based simply on the waste from the end buyer, but to do with spoilage in warehouse/pests, crops not getting purchased, etc. the whole process from planting to being eaten (or not).
I suspect it simply shows it is unreasonable to expect high efficiency in such things, although it would help if food was used locally by consumers not overly fussy about looks.
As for half the world starving, the cause there is people settling, many generations ago, in parts of the world where they couldn't be reliably supported: and now their decendants find themselves in an awful situation.