While you're technically right about the possibility, in a real game scenario you'll hardly ever have the time to put a combat squad into a tank to gain vet instead of actually fighting alongside your armor. This might work for RE squads who don't contribute too much to your overall fighting force, but if you try this with a ranger squad against any capable opponent you'll end up on the back foot almost immediately.
A non vetted infatry does not contribute that much damage anyway.
Riflemen
2 shots of a M36 on vet 0 Panther get to around vet 1.25
A single shots of a M36 on vet 3 Panther get to around vet 1
Ranger
2 shots of a M36 on vet 0 Panther get to around vet 1.05
A single shots of a M36 on vet 3 Panther get to around 0.90 vet 1
So it can help even with little use.