The static method changes the class variable. The main method prints out the value currently in the variable, which is not what it started with.
You might say that the problem is obvious so there is no reason to avoid global variables. But this program has 10 lines of code. Try finding a problem like this in a program of 50,000 lines. Confusion reigns.
Toyota cars experienced unintended acceleration 2009 - 2011 resulting in several deaths. Part of the problem was the many global variables in the throttle control program. Toyota has (so far) paid $1.2 billion in damages.
Modularity is important.
Can a static method call another static method?