I was very interested in analyzing the item data of D3 and looking into various tools out there that might have access to this data. Some of those tools included botting tools which used DLL injection (roughly speaking, run inside of the D3 process) to achieve calling native D3 functions such as "GetItemAttribute". You can see this in their documentation.
Reading the forums for these tools, I noticed one player saying they used this function on an unidentified item in their inventory and it returned stat values. This means that the stat values are already there and accessible with these tools before an item is identified.