Caravans rarely connect the chassis to the electrical ground, so there has to be a ground wire running all the way from the trailer plug to the lights. That should be a thicker wire, but that is not always done.
The Australian and New Zealand towing socket is a 12 way socket, which is a row of 7 and a row of 5. Some trailers only plug into the row of 7. The middle of each row is earth, and it's possible that the earth on the vehicle socket is poor or non-existent on one of the rows but OK on the other.
A poor earth is very common on trailers. On some Jaguars and Land Rovers there is a trailer light test, that allows someone to check if all the lights work (and at the right time) as it lights up each light in turn, along with the corresponding light on the car. The system also turns on all of the lights at the same time, and that is done mainly to see if there is a faulty earth.