I'd disagree with that, at least with the “mostly” bit...
Even if you never change your lens most cameras aren't even remotely sealed and there are gaps around buttons and switches etc through which contaminants can enter plus it's been admitted by the manufacturers that much of the stuff that ends up on your sensor is stuff that's come off the cameras internal parts. Over time the manufacturers have started to make cameras out of materials that are less likely to shed bits but I suppose that it will still happen at least to an extent and there have been well publicised issues recently with oily substances coming off the moving parts and contaminating the sensors of new cameras.
My own experience has lead me to believe that much of the contamination my camera suffers from is internal debris as it was plagued with contaminants on the sensor when newer but these days it's relatively rare, I assume because much of what was going to break off the internal parts has now done so.
Obviously you have to be sensible when changing lenses but even if you never do so you still can't guarantee that you'll never suffer from a dirty sensor.