@E17 It may feel unfair, but that’s not the reality. There were over 100,000 (mostly qualified) applicants - Too many applicants, too few spots. It’s just the way it works.
As far as your HS friend - They are not specifically comparing you to her just because you are from the same school. It doesn’t work that way at all. Get that out of your mind. Asking her anything about her application helps you zero as it has nothing to do with your application.
You had to write four essays for the UC’s - these were very important. It’s hard to know how yours came across without reading them.
As everyone else has said, rejection is a part of life, it’s how you handle it that matters. Take a little time to feel disappointed but don’t dwell on it. Don’t become a hater. Embrace those schools that have embraced you. Focus on all the wonderful admits you’ve received and select the one that best fits you and be positive!