This was certainly very widespread, with variations, in many places or nations around the world. The purpose was to mass-scan the populace with healthy or harmless X-rays for signs of tuberculosis and other illnesses in the picture of the lung.
Poster promoting mass X-ray screening, England, 1945-1959 (Object number 1981-2088 Pt10)
One of these mobile devices is on this informational pamphlet:
Pamphlet detailing the Mass Miniature Radiographic Unit, manufactured by Siemens, dating from the mid-Twentieth Century. The pamphlet shows the floor plan and a variety of internal pictures of the Unit to show the suitable arrangement of the Unit. Presumably produced as part of the advertising output of Siemens for this unit, the pamphlet provides the viewer today with a visual map of how the Unit might have looked during their major deployment from the 1940s until the 1960s.
via: Radiography and Preventing TB on the NHS (with even more pics)
In the US it was just like that:
U.S. army hunts tuberculosis. Photograph accompanied a front-page story in General Electric X-ray Corporation’s newspaper, the Victor News, in July 1941 . General Electric reported that the army had just purchased
45 of its 4 x 5-inch photoroentgenography units for shipment to various induction centers throughout the country. The boned looking
private on the right was proudly identified as an inducted General Electric employee.
Figures 12, 13. (12) TB respects no age. Poster (circa late 1940s) suggests that everyone-from children to grandparents-should have a chest radiograph. (Courtesy of the American Lung Association, New York, NY.)
(13) Lining up for chest radiographs. Photograph shows the mobile radiography unit of the El Paso Tuberculosis Association in action in 1948. Notice the little girls lining up with everyone else. In the case of this particular photograph, it is not certain exactly who underwent radiography and who did not. (Courtesy of the National Library of Medicine, Bethesda, Md. [Previously appeared in Haygood TM, Briggs JE. World War II military led the way in screening chest radiography. Milit Med 1992; 157, 113-116.)
Tamara Miner Haygood: "Radiologic History Exhibit" Chest Screening and Tuberculosis in the United States, 1994. (PDF)
In Germany there was a Röntgenreihenuntersuchungen 1939-1983 and some of these were mobile:
Ein Röntgenzug bei der Betreuung der Landbevölkerung in Hermstedt Thüringen (GDR) 1957 - Foto: Wikipedia
Inside one such mobile unit, West Germany –– Gütersloh: Röntgenreihenuntersuchung im Röntgenzug Sauerland, 1957
Foto: Gütersloh, Stadtarchiv | BB19837
Internet-Portal "Westfälische Geschichte" | https://www.westfaelische-geschichte.de/med2473
The procedure as such – the Röntgenreihenuntersuchung – although not mobile, was continued in the German army until 1999.
Even now such mobile units are in use:
Zweites Leben für Röntgenbus
Ein Röntgenbus wird in Thüringen für die Untersuchung von Flüchtlingen auf Tuberkulose eingesetzt. So können Krankenhäuser entlastet werden. Eine Arztpraxis wertet die Aufnahmen binnen 24 Stunden aus.
Das Röntgenmobil steht in Erfurt vor der Thüringer Staatskanzlei. Der Bus wird bei der Erstuntersuchung von Flüchtlingen auf Tuberkulose eingesetzt.
The reach of that procedure was at 85–90% of all inhabitants in 1982 when they detected 4,6 infected people per 10.000.
Q What was the advertised purpose, and if there was an underlying purpose different than that, what might it have been?
As always with Germany, it has to be brought up that until 1945 there were around 150 doctors involved in this screening in a less than desirable "underlying" aim for it.
Radiological sterilisation and castration. (src) 2% of all 360000 undergoing this procedure were 'treated' with x-rays.