To be able to access Hugo variables, Hugo would need to be installed. And Netlify needs to know the version before starting to build the website. I think you can now see where the problem lies. Also, Hugo version would just print the version of Hugo installed on the system running it. It won’t actually tell you the version someone else used to build the website. Hugo docs mention that you might need to configure: Host on Netlify | Hugo. Plus, not all SSGs have the feature to print their versions and not everything needs to print versions, for example Node version is a variable that would never be printed.
Netlify needs to be able to build lots of websites and they’re expected to work with 0-config. Many people don’t use the latest versions of the dependencies because their app was written with legacy versions and the latest versions have breaking changes. The developers might not have the time or ability to migrate to the latest versions. So, it’s generally considered that older versions will be able to build newer websites. But, newer ones won’t be able to build older websites due to the breaking changes. And yeah, there are exceptions to almost everything, just like it was in your case.
Specifically in case of Hugo, many developers are still able to build their website with Hugo 0.54.0. So, they might not need to specify the updated version, but there might have been some changes in the later versions that fixed your problem.
By adding the environment variable like you did.
I’m not sure what’s the change according to you. I just ran Diffchecker - Online diff tool to compare text to find the difference between two text files to check for differences in text and no difference points out a difference in indentation. I used the website deployed by me and you, checked their source HTML and ran the tool. I used Pablo - Martin's Blog for testing.