They come from all over the world.
As you don't seem to believe that only 3% are checked, here is the source.
publications.parliament.uk
41.In addition to the customs paperwork checks, a small proportion of goods arriving from outside the EU are physically checked at the border. The Port of Felixstowe told us that “the number of physical examinations” only represented “3% of third-country import containers”.
So they are checked at the border. The government is seeking a deal that any checks will be done either where they are despatched from, where they are received or somewhere en route. Or in any case, not at the border This is viable, where a container coming from say China would not be.
I've in the past quoted that checks are intelligence led, and that would continue. (This isn't in that link though)
I recommend reading the link, it explains a lot about how customs currently work.