Because the tone of the string is determined by the thickness and tension, and because the tension applied by bending the string to the fret varies from string to string, a simple division of the fret distances so that each string is fretted at the same length should produce some minor variation of the pitch achieved on heavier vs lighter strings. Some guitars take that into account by angling the bridge relative to the nut, but if the frets are all parallel to one another and not angled as well, there is still some error.
The degree of fret variation in the picture looks too extreme to accomplish "perfection" which in any case would still be defeated if different gauge or composition strings were used. And of course unless the frets were constantly moving around as the strings stretch decreasing the unfretted tension, there is no way the guitar is never going out of tune. Loss of tune has nothing to do with fret location. Ever hear of a piano tuner?