Progression in Real Life
Everyone knows that if you do a certain thing your experience and skill doing that thing increases. For example, if you do push-ups every day until your limit, your limit increases. At first, you might only be able to get five. Soon you get ten in a row and at some point, the number increases to 15 and so forth. Another example would be playing video games. At first you can't beat the first boss of Dark Souls, however, if you replay the game from the beginning it will be much easier even if you've forgotten the mechanics. Even picking up another game similar to dark souls or even Dark Souls II you would play on a higher skill level than before. Okay, enough examples. So in real life, we're able to improve our abilities through training and practice, and that works for any skills, from pure strength to knowledge or intelligence to reaction.
Where Video Game Stats Came From
So over time, we have all these games with hidden or visible stats that range from common MMORPG or RPG stats like strength, intelligence, critical hit chance and the like to jump height, run speed or endurance regeneration. These stats weren't just a random idea someone had at some point in the evolution of gaming. No, they came from real life. As mentioned before doing something rewards you with experience in the task you did, if you gain enough experience you make higher jumps in your skill. These are represented in video games as levels. They can also be seen in real life when learning languages for example, there are different levels of difficulty rewarded like the foreign Japanese test. The JLPT (Japanese-Language Proficiency Test) has five levels going from N5 to N1.
So stats we see in video games actually come from real life to represent these concepts in a mathematical form that can be used in games. Don't forget that video games broken down consist only of logic and mathematics: technology.
Stats in Animes
So whether anime stats came from video games or real life is an interesting question at this point, though, it does boil down to the same thing in the end. Obviously, animes that play in a video game world in one or the other way implement stats. There are however animes that don't play in a video game worlds like Dragon Ball Z, The Seven Deadly Sins, etc.. In the end it comes to the same idea: how can we represent skills and comparison of skills in a simple easy manner, such as an equation.
There's a Scheme
If you didn't notice it yet, there's a scheme here. We're taking something we know from real life and translating it so we can use it with math and logic. That's the same thing we do in physics. We take math to represent features from the world in a logic way we can comprehend. We've created this mathematical system called physics, to predict and understand how the world works and what the mechanics are. We create such systems to create our games or to make our animes work in a way that one might think the virtual or fantasy worlds actually exist. Unfortunately, math isn't a given thing that exists, it's a concept that was created millennia ago to comprehend simple things in the world as defining an amount, a weight and the fundamentals of the world by now. There are still a ton of theories in mathematics that haven't been able to apply to physics yet and still, we were able to get until quantum physics.
What About Magic or Spirit Stats?
In the "The Seven Deadly Sins" anime the power level is defined by the attributes strength, magic, and spirit. Strength would be no problem to measure. We can measure strength with our physics formulas to get the force used (F = m * a force equals mass times acceleration). How do you measure spirit and magic though? While I can't answer this question as of now I can say this...
Some wizards out there actually create formulas to calculate these things but those formulas have no scale. They don't even use any numbers as there is no scaling for it yet. One of those wizards is Frater V.D... In one of his books "Hohe Schule der Magie" (Engl. "High School of Magic"), he explained a few things using formulas and variables so the relationship between each of the variables can be understood easier.
Does That Mean Those Formulas Don't Apply?
Don't worry they're not only for show, quite the opposite. As I already mentioned, even though they have been created to show the relationship between different factors without a scale you can't use them for calculation. If you happen to have a scale however you will be able to use them for calculation. The problem here is if you create a scale that doesn't fit with the scales and units used in physics you might end up in a compatibility issue between both and from my experience and data I've collected so far there is a connection between physics and magic. So to be able to apply the power levels and stats from games and animes to real life we need to be able to fill up the gap between magic, spirit, and physics. Luckily quantum physics might be another step further to fill that gap.
Also, keep in mind like it is said in "The Seven Deadly Sins", the stats are not static, they change depending on different factors, like equipment, your mind, your will, etc..
So keep on leveling and perfecting your skills and push yourself! (though not too much, please D:)