In the first case 8 hours' drive is a premodifier in the inflected genitive. The inflected genitive does not always express possession. It can express the doer of an action: my friend's arrival, object of the action: the thief's arrest, origin: Shakespeare's plays, etc.
In this case it expresses measure: the drive lasts 8 hours
In the second case we have a singular noun in a common case premodifying another noun. In such cases the premodifying noun is usually in the singular: a department store, a pyjama party, an 8 hour drive; I think we should use a hyphen in such cases: an 8-hour drive, a 23-year-old girl, etc.
We use plural when there's a difference in meaning, eg. a custom-customs= customs officer.
I hope I have helped.