Theres actually two BMS device files:

DEVICESORTING: reflects the devices as Windows assigns them to GUIDs and can be checked in then Windows controller panel. This is also what shows up in the BMS Controls device pulldown menu. DEVICEDEFAULTS: defines the flight axes for each controller as selected in the BMS Controls assignment pages, and maps the device name back to the Windows IDs.

The point of these files was to maintain the axes assignments within the BMS Controls pages even if the Usb ordering changes as devices are unplugged or moved to different ports. Sometimes it still gets out of sync and you either make the fixes manually in the files if you understand them, replace them from a backup, or delete them and they will be regenerated. In which case you have to reassign the axes again within BMS.