Two things come to mind, and there may be others. TO turn on the a/c unit, all the thermostat does is connect the two wires together. IF they are shorted together anywhere along the way, in the wall, or who knows, that will do it. In a trailer, they can flex a bit, and that may only be intermittent, which may be why it doesn't do it all of the time.
The second thing is that the relay or contactor those two thermostat wires control could be sticking. Well, a third thing, someone could have been sloppy when wiring it up, and the wires around the screw contacts may be too long and maybe shorting the two control lines, simulating the thermostat closing.
A close inspection at the a/c unit might find the problem. You might consider just running a new cable from the thermostat and be careful of the routing and staples or clips you use...getting one of those too tight can give issues as they are metal, and can short the two wires...the insulation is decent, but not impervious to damage.
IN summary...there's 24vac on one lead to the thermostat...when it calls for cooling, it connects that 24vac to the other wire which goes to a relay (contactor) in the a/c unit which applies the 240vac to make it turn on. So there are really only two things that will keep it running: the 24vac is constantly being applied to the a/c unit to turn it on, or that relay is sticking. Sometimes, just a spray with some electrical contact cleaner can fix a sticky contactor. On mine, over the winter one year, a mouse electrocuted itself across the a/c power contactor. By the spring, it was all dried out, but it took a lot of cleaning to get the contactor to freely move as it should. In that instance, it was stuck open, and it wouldn't turn on, but it could happen the other way, too. Insects, and who knows what can mess it up. They're sealed, but not perfect.