The principle of maximum irreversible is proved to be a consequence of a stochastic order of the paths inside the phase space; indeed, the system evolves on the greatest path in the stochastic order. The result obtained is that, at the stability, the entropy generation is maximum and, this maximum value is consequence of the stochastic order of the paths in the phase space, while, conversely, the stochastic order of the paths in the phase space is a consequence of the maximum of the entropy generation at the stability.