Although filling an entire trunk full of peanut butter, let’s say 500kg worth (assume a 450 litre trunk and density of 1.1 kg/l according to Google), then adding all that weight over the rear axle would affect the handling and balance of the car, potentially making it dangerous and therefore illegal to drive.
So, it’s not actually that clear cut that it wouldn’t be illegal!