If I am not mistaken, it is standard operating procedure for the lead official to check with each head coach at some point inside of the 10 minute mark during warm-ups to verify that all players are legally attired. If not, the required change must be made before the offending player takes the floor.
The headbands were most likely in violation due to the logo (assuming they did not violate the color ruling). If that was the issue, I cannot see why turning them inside out would not have been acceptable, but if they were forced to remove them there was most likely a very good reason.
As to blaming officials for losses, I used to tell my son: "Do you know how to spot a loser? He's the one complaining about the officials. Act like a winner even when you lose."
Officials are human. They make mistakes and miss calls (yeah, some of them seem to be worse than others), but in 50 years of watching and participating in sports I can count on one hand the number of times that I have seen an official that I thought was out to get any particular team.
Players commit turnovers. Players miss layups. Players miss wide open jumpers. Players miss free throws. Players expect officials, however, to be perfect.
Coaches make mistakes in substitutions, misuse timeouts, and make strategic errors in offensive and defensive decisions. Many of them expect officials to be perfect, though.
In my opinion, if most folks were completely honest they would actually tell you that they don't mind when officials make mistakes, so long as it benefits the team of their choice.
You cannot expect officials to be perfect. You can only ask them to be consistent.
Just my $0.02 worth.