1) It was to be the primary weapon of the World Wide Socialist Revolution. That means it had to operate reliably in every environment on Earth, from the Siberian tundra to the jungles of Central America to the deserts of the Middle East. It would have to work flawlessly in a -50C blizzard and a +50C sandstorm, as well as in near 100% humidity while caked in mud.
2) It was to be cheaply produced by the million in not particularly advanced Soviet factories, by people who were not highly trained, then shipped to all corners of the Earth.
3) It was to be used by guerrillas, generally poorly trained peasants, fighting to overthrow professional US-backed armies (see: Cuba). Thus the rifle had to allow untrained fighters to go toe-to-toe with professional warriors, given the constraints of the fight as it was imagined: hit-and-run, ambushes, etc.
When you look at the number of design criteria it had to fulfill that had nothing to do with its merits as a marksman's weapon, it's amazing how well Kalashnikov achieved what he set out to do. The fact that it's still the primary weapon of insurgents, rebels, and terrorists 60+ years later is testament to that. As an engineering feat, it's an absolute marvel.