When using vehicles, unnecessary noise and avoidable exhaust pollution are prohibited. In particular, it is prohibited to run vehicle engines unnecessarily and to close vehicle doors excessively loudly. Unnecessary driving to and fro within built-up areas is prohibited if it causes a nuisance to others.
Noise is a public nusince. I definitely wouldn't want my neighbours constantly slamming their doors at night. I doubt you are going to get fined if you are slamming your door occasionally or in the middle of the woods.
Laws exist to ensure that we can all live peacefully together. I think most people agree that excessive noise is more of a negative than a positive. Most places have similar curfew laws where excessive noise at night is not allowed.