Tournaments are not all about winning medals and trophies. It's about testing your ability, allowing yourself to be judged/criticized by other people and learning from the experience. You may feel sad or embarrassed when you lose, but you're already a winner just by entering a match, overcoming nervousness or shyness! It's cool to receive shiny medals and trophies as symbols of your hard work, but that shouldn't be the main concern when you compete.
Judges are there to help you get better. There are skilled judges and less skilled ones and they all may make mistakes, but you are asking for their opinions and agreeing to trust their decisions. I disagree to a comment that there were some sleepy judges yesterday. They all worked hard as much as the competitors, and whether you like it or not you have to respect their decisions. It's easy to blame other people when you lose but that won't help you get better.
In many matches I competed both domestic and international, I lost so many times even though I felt that my overall karate skills were better than other competitors. But I always humbly accept my loss, that my opponent was better then and there under those rules, and I learn what I need to do to get better by next time. I actually learn more when I lose, but even when I win I know I'm not perfect and will strive for better.
And I know how hard it is to judge, and I'm always thankful for their service regardless of the result of my (or my students') matches.