It doesn’t need to be random, it can be contextual. For example, if you are reading a videogame review then an ad for a new GPU or a gaming keyboard are probably relevant to you. Or if you reading a travel guide to Rome, then having ads for restaurants and less know museums can be more relevant than something that followed you across the internet.
In relation to the tanks I think Spain said the quiet part out loud. European countries probably had a bunch of broken or missing military equipment that was never reported properly.
As an example, from Portugal, when the Tancos arms theft was discovered, the military prosecutors went to talk with “someone”, and the thieves anonymously returned the stolen arms and some weapons that the army didn’t even know were missing (shoddy bookkeeping on their day time job led to poor bookkeeping on their little hustle).