I can't help but wonder if the guy who wanted to make the buy got a lot more guidence, research, and direction than he really wanted. You seem to know a lot more details of exactly what we wanted and what he would be using it for than he did. maybe there is a communication issue with your friend. Perhaps he wanted a little advice on making a decision from someone he perceived as knowledgable, and perheps he felt you were making the selection for him instead of helping him to make it. How many times do people say "don't buy a gun for your wife, GF, or buddy. Let them choose, because if they don't like it, they won't shoot it".
You don't have a right to be upset with your buddy. He might be upset with you for taking over what he just wanted your opinion on.
Unless you absolutely know exactly how much profit is made on the specific sale, you have no right to grumble over what additional price breaks they did not give. They probably made under $100 on that gun, and possibly considerably less. If you paid by credit card, another 2% off the price tage went to the processing company. Margins on guns are small. They make more from selling ammo and supplies. Typically, new merchandise is not negotiable, are typically competitive, because wholesale cost is easy to find. USED guns are negotiable.
Also, if it is required by law, I doubt the store gets the $30 for the test.