As you notice, some of the students got into B Class such as Ibara, Kendo, Tesytetsu, and Awase. Why is that? How does UA assign class to their prospective students?
You seem to be thinking that "A is better than B" like it would mean on an exam grade, explicitly ranking the classes, but that's not the naming system in use here. Typically in Japan it's the same as naming them Class Orange and Class Rhino. They're just distinguishing between the groupings at the same grade level, not ranking them.
Unlike in most American schools where everyone in the same grade tends to be lumped together with fluid groups that vary between every single course and travel between rooms for each of their courses, the Japanese system tends to break the student body into chunks who all stay in one room as the teachers themselves move between the classrooms. That's why classroom scenes always start with the students already there, in the same room as always, and the Teacher walking in just before beginning to teach.
So being "Class A" just means you're in Room A all the time (except for PE and anything else that the room is inadequate for), not that you're among the best. If your schools have ever had a "Homeroom" class, it'd be like grouping you by "Mr. Fenster's Homeroom Class" and "Ms. Manotti's Homeroom Class".
A few schools might use the secondary labels to imply some sort of hierarchy, by trying to group like-minded or similarly-abled students together, if they can support such variations in curricula, but this is not necessary. And your entrance exam results imply a random coin-toss selection: approximately half (6 of 10) went into one class, and the other approximate half (4 of 10) went into the other.