There won't be random testing, but there will have been testing done on people presenting to their GP (uhh... "family doctor"? The local guy with the clinic and five-ten other people like him, who are the gatekeepers for everything but not necessarily a specialist themselves in any one discipline), at A&E (the ED), an out-of-hours clinic (a mix of those things), or calling 111 (that, but on the phone) with symptoms consist with COVID-19 - which is basically a heavy cold - initially for those at risk of exposure (people returning from hotspots within two weeks), those in high-risk categories or occupations, and anyone who's come into contact with someone who has tested positive for SARS-CoV-2.
If the USA is, or the States themselves are, only testing people who are presenting with advanced symptoms it's little wonder that more than 10% of tests are positive, and that could well indicate that the true representative number of people already infected is 100x higher than the tested positives (because the average known infection rate is 0.1% of population elsewhere) - and roughly 5x higher still accounting for the cases that never present.
That one's easy. They were tested because money.