In order to answer your question it's essential to differentiate between 'Use by' and 'Best before' dates.
A 'Use by' date indicates that it might be detrimental to health to consume the product after the given date. It's illegal to sell, or even give way, products after their 'Use by' date.
A 'Best before' date simply indicates that there might be some degradation in the quality of the product after the given date, but there is no risk to health if the product is consumed after that date. It's perfectly legal to sell such products (unless, of course, there is 'misrepresentation' by selling the product as if it was still 'within date').
Four year old chocolate might not be at its best but it's not going to kill anyone. Personally, I'm happy to buy chocolate that's a year or so 'out of date' but the texture can get a bit 'dry and powdery' after that. On the other hand, I'd have no problems buying, and eating, canned goods that were 20 years past their (nominal) 'best before' date, since they'd probably taste just as good as on the day that they were canned.
Chris