It is because you selected the wrong tactics for the particular match(es) that you lost, and probably the other deciding things were not on your side (random advantages, preparation, morale and other hidden effects).
If higher quality (only) guaranteed wins, then this game would be less appropriate as a football management game. It would also be too predictable and relatively much easy to play and win all competitions.
Friendly matches are different from competitive matches.