corner goes right.
bike enters corner on left side of track - arm with weight extend further left of the track (over the grass).
mid corner - bike has shifted to inside of corner (right side of track) - arm with weight has moved even further inside corner (over the grass)
bike back on the outside of the corner, arm again extends to the left of the bike.
So the weight effects the position of the centre of mass of the 'bike object'. It describes an easier-to-drive corner than the racing line on the track allows.
You can (and do) get this effect by leaning anyway. And by sticking your leg out. There are other subtle ways to achieve this result.
If we're talking about swing-arms ... you could also use these to conserve bike speed - ie, when you brake, the bike slows, but the swing-arm comes from behind, and round to the left - as you exit, it goes back - transfering that energy into the bike again.
The biggest problem is that adding any weight to a race vehicle is a non-starter. And taking up more room that the vehicle 'has' is again a no-no. However, in cars the driver could 'scoot' from one side of the car to the other, providing a not-insignificant movement of weight. (1/10th of the total weight perhaps?)
Also, with a motorcycle, a highter centre of gravity might aid this effect, without changing even the aerodynamics (or weight) of the vehicle.