I don't know - that's actually very surprising to me considering each user has their own temporary folder.
I can't imagine what reason could exist for this functionality except possibly to provide backwards compatibility with some popular apps that have been poorly written.
that's actually very surprising to me considering each user has their own temporary folder
To extrapolate, I found it unsurprising not because it's either Windows or POSIX individually, but because it's both together.
It's been many years since I was a Windows developer, but I remember back then that the opinion of the POSIX implementation (XP era, not NT era) was "there be dragons" and to avoid it.
Because the proper Windows way is to specify where to create the temporary file; for example the developer can choose between the user-specific 'temp' folder, or the 'temporary internet files' folder, or the folder returned by GetTempPath(). Some old programs rely on the temp folder being shared between application, others don't. And then you run into access issues - sometimes on Vista you don't have write access to whatever GetTempPath() returns and you'll have to find something else, like the user dir returned by SHGetSpecialFolderLocation or any of its predecessors or new versions, and tack "\Temp" onto that yourself.
So, to get back to your question, the posix compatibility layer in Windows is very old and back then all the above didn't exist and they had to make a choice on how to implement the function. Back then (this decision may have been made as early as the late 1980's), using C:\ wasn't all that stupid an idea; either way, the point was that the file would be deleted when the file handle was closed anyway, so it's not like C:\ would be polluted with all sorts of files.
Of course those assumptions changed in the past 20 years, but you can't just change the behavior of your core OS functions because you don't know how it will break old applications. If you're interested in Windows development, the The Old New Thing blog goes into detail on issues like this.
I don't know - that's actually very surprising to me considering each user has their own temporary folder.
I can't imagine what reason could exist for this functionality except possibly to provide backwards compatibility with some popular apps that have been poorly written.