I guess, what I should have said is "you have the right to be disappointed, but instead of just being angry at HR or the top-boss, you should ask if there is a constructive way that the company can pull-together to avoid this happening again next year." You didn't indicate where you are with respect to being one of the top earners in the company, but you can believe that if they had to return some $ to you, they did so as well to everyone who makes more $ than you (assuming they all contributed). You should suggest they bring in someone to talk with the entire staff about retirement planning. The recordkeeper from your 401k plan should be able to do so for free, and provide the absolute basic fundamentals of compounding interest and annual contributions limits, etc. If you are confident enough in your own skills - maybe you can volunteer to host an informal lunch-n-learn on the topic. Have the company offer to buy lunch. If HR is not okay with that, they should at least be willing to bring in a professional.
There are two 401(k) tests - one for overall contribution levels (% of those who actively participate) and one for the average deferral rates (percentages of actual $ contributions). The HCEs and the NHCEs cannot be more than 2% apart from one another when you average it out. So, for example if all the HCEs put in an average of 8% and the NHCEs put in an average of 3% - you have a 5% difference and this is way more than the 2% allowed by ERISA, this a testing failure and you have to return some of the HCE contributions to bring it to within 2% of the NHCEs unless you have one of those Safe Harbor plans.