The DataTransfer object is used to hold data that is being transferred between contexts like a clipboard, drag n drop etc.
It can be accessed through the dedicated event like the DragEvent, that is gotten as a Drag operation is started or dropped.
Like so:
DragEvent.dataTransfer
It can be filled with any compatible data type, even with PHP variables which can be very useful. You can assign a PHP variable with the DataTransfer and then use it in other logic.