My college had a decent-sized contingent of Bulgarian & Romanian international students. The difference in their math abilities upon entry was striking. While most of my American-born classmates struggled in discrete math, linear algebra, and vector calc, my Bulgarian friend was like "I learned this when I was 9." They were frequently tapped as TAs by the professors, because they understood the material on a level th…
However, the majority of people don't have this luck, and they get seriously left behind. I don't know as much about Bulgaria, but Romania has the largest percentage of functional illiteracy in the EU - almost half of Romanian high-school children can only theoretically read (they recognize the letter symbols, but can't actually read a text and understand what it meant, at the most basic level). A good percentage of people go through the mandatory K-10 education system through cheating, corruption, and basic knowledge.
Romania is very focused on national exams, one obligatory one in 8th grade and another one in 12th grade. There was a push about 10 years ago to implement some stringent anti cheating controls (cameras in each exam room, nothing fancier or more oppressive), and the pass rate plummeted from over 95% to 50% in that one year. There were entire high schools that had had straight As (10s) the year before and where no one passed the year after. This was the level of cheating and corruption.
I will also note that the stuff about having luck with your teachers is also not an exaggeration. I attended the second best high school in the country by admission grade (there is a national exam in 8th grade, and students choose their preferred high-school in a ranked vote style, and then every student is assigned to a high-school in order of exam grade + preference). This is also a high-school in the capital, and a wealthy area. I had some really good teachers in a few things, and a few really abysmal teachers in others. Even in CS, which was the high-school's specialty, I had teachers who seemed to barely know the basics (but also others who were pretty decent).
It's also important to note that there is widespread, normalized abuse in the teaching system, especially towards children with poor grades, or who are just poor. Things like yelling, demeaning, even spanking and hair cutting (for male students with longer hair, especially) are relatively common, and still considered normal in some areas (though, thankfully, fewer and fewer).