And it made me wonder if there is any advantage to obfuscate your (X)HTML, CSS and Javascript like this? To reduce the size of the file perhaps?
Obfuscation is slightly different from another common technique with Javascript files, minification. Minification is common with Javascript since it reduces the file size, which, with large files can significantly reduce their size (since large Javascript files often contain lots of comments, line breaks, unneeded spaces and so forth which can be stripped to reduce the size of the script).
Obfuscation, on the other hand, is also more about concealing your code from others, by changing variable names to others which are obscure, or that remove meaning from the Javascript files. However, by doing this it often reduces the file size, since variable names are often much shorter than those in the original file. This is a common technique to make it harder for others to simply copy code, and is more about protecting the code which is obviously much more easily accessible compared to other platforms.
Doing both minification and obfuscation are advantageous to your scripts, since they reduce the size of your Javascript files, which reduces the time taken to load your pages, and also makes it harder for others to reverse engineer it (if this is an issue for your code).
However: note that it's not foolproof - there are certain tools that exist which make it easier to reverse engineer obfuscated code, so it doesn't make it 100% safe from others who really want to take a look at how your scripts work.