This is all too common in developing economies. Due to general economic mismanagement leading to limited opportunities and sticky cultural beliefs, students are pegged against each other. A national exam is used as a filter to allow those the exam deems "smartest" into the top programs in the country. These exams are notorious for being cheated on, and many students effectively spend their secondary education over fitting their education to succeed on the exam reducing the likelihood they will pursue any other interest.
The thing that I don't think most of these countries realize is, if you've spent an entire child's life teaching them to compete with others, and making that a ticket to their success, all you do is enable that behavior and it becomes a habit.
I've met many foreigners working in the West who strongly believe that because they were top performers academically in their countries they are better than everyone and it shows through in arrogance much more frequently than people who we in the West might consider "top performers". What I like about many Western education systems is the emphasis on collaboration. Some Western countries don't have a national entrance exam and that's really for the best. You create a funnel of homogeneity in your academic system by using that as your qualifying metric without much thought to anything else and your economic development persists on that path with those deemed to be top performers looking down on their fellow citizen.
Of course, I do not want to over generalize. This is not ALWAYS the case and I've also met many foreigners who are humble and amazing to work with and Westerners who are arrogant and dismissive.