You can add your own extension to a file, it is there for the comuter to recognise what program is required to open it and also for the user to recognise what the file is. Original files tend to get given .bin (for binary) .ori or .org (short for original) extensions. When I started I used a program and emulator from Racelogic, long ago out of production and support. They advised me when doing training to use .org for original files and .mod for modified files so as not to get things confused. .bin could be any binary, so is less specific.
.xdf is used with tuner-pro software as their address descriptor, rather like .a2l and .dam, which are factory-developed descriptors and can be imported into some hex editing software programs.
.hex is used to show that it's the actual ECU file (hexadecimal) data that is manipulated in hex editing software. It is still a binary file anyway so it could just as well have a .ori, .bin, .whatever extension which is only there for help in identification.