I tried to echo both %HOME% and %USERPROFILE% on a few windows systems (XP, 2k3 Server and Vista) and only the latter worked. %HOME% is not set in any of these systems.
%HOME% isn't set by Windows. %HOMEDRIVE%%HOMEPATH% points to the user's home directory. %USERPROFILE% is where the user's profile is stored, and may or may not be the same as his home directory. %HOMEDRIVE%%HOMEPATH% should be used then, defaulting to %USERPROFILE% only when those variables are not set (that's unlikely, but could happen e.g. with the runas command)
The code works as expected because it uses os.path.expanduser('~'), which will look to the right values depending on the platform. So it's just the documentation that is wrong about how distutils behaves under Windows. I'll fix this doc asap, thanks for the feedback.