0x7E8 to 0x7FH on the CAN bus?
we can send a request with ID 0x7DF and would get a response with IDs
between 0x7E8 to 0x7EF.

7DF is actually a broadcast request. You can address specific nodes using 7E0-7E7 messages, where address is 7E0 offset + 0..7 node ID. Then you'll get response only from that one node (if it is present on a bus, of course).

Is 0x7E8 actually the ID of the responding ECU or is it a
general-purpose address just to relay the response back to the sender?

7E8 is both, a general purpose message offset and a message address made of this offset + node ID = 0. Consequently, the response messages can be 7E8-7EF.
Note that the above is true only for standard CAN frames. The IDs for extended CAN frames (supported by some OBD2 implementations) are a bit more complex and allow addressing up to 256 nodes.

why 0x7DF has been chosen to send a request?

I have no idea. If I have to guess I'd say it was an arbitrary choice. It seems 0x780 and up is a popular address space for some very specific functions, like LSS messages in CANOpen.