If it's a true courier - for example, FedEx or DHL - then you will pay Customs. They pay your charges due then charge you back and because couriers follow the "rules" then you will pay.
If you have it sent through a "non-Express" route - usually standard Airmail or Surface Mail then once it reaches the UK it will be processed through the UK Post Office and, as you say, it is really "pot luck" whether you get charged or not. Probably because of the huge number of low-value packages they handle. Theoretically the Post Office pay your charges then collect off of you on delivery - though I've had several marked "Customs Charge Due" and the postie delivering wouldn't didn't notice and wouldn't take any money even when I pointed this out even though you shouldn't be allowed the package without paying! On the other hand, sometimes you get a letter saying you have to go to the nearest depot to pay and collect.
*Every* package goes through Mount Pleasant sorting depot so it's easy to see why some get missed. The Import Allowance has been