You are talking about event reparenting. Check this question - event.getSource() alternative in LWC? (considering origin reparenting).
Consider below components chain in LWC:
When event is fired by grandChild, you can access all the data- attributes and any other attributes directly in child component using event.target or event.currectTarget, However in parent component, event.target will refer to child component because of event reparenting and so you if you want to send some data to parent component from grandChild, you should use CustomEvent.detail for communicating the data within.
1. event.target or event.currentTarget will give you the reference of the element which fired the event and event.detail will give you the information of data in custom event
2. event.target or event.currentTarget is valid for both standard or custom event. event.detail is valid only for custom event. (in standard event, event.detail will return 1 always)
- You may get values in event.detail for lightning base custom components as they seem to fire event with data in detail as shown in this example