The duty charged is supposed to be related to the fair market value of an item, sold/acquired at arms length, in the country it was acquired.
Yes, but there's considerable room for debate on what constitutes a fair market value, and how such a fair market value can/should be determined.
As a matter of practicality, absent any other concerns, customs officials will usually rely on what appears to be a commercial invoice when levying duty, so a customs broker will normally present that invoice as confirmation of that value.
Provided an invoice is present and easily found on the surface of the box. With inexperienced senders, this is often a problem as they may only include a packing slip that's incompletely filled out (otherwise the item value + shipping cost + item description would be known to customs and the whole routine would be simpler) or even no slip at all. This will result in a situation where the clearance officer needs to make a call on item valuation. Given the volume of items to be processed, this tends to be a quick & dirty process. It's not like there'll be an appraisals officer having a cup of coffee, thinking about possible valuations, doing some online search to see list prices, etc. Given a clearance fee in the order of magnitude of $15 it's evident that the whole process can't take more than a few minutes at most, and needs to be automated to the highest feasible degree.