It's adding padding so that if you had an array of these unions, then each foo[i].var1 would be aligned to a 4 byte boundary (the size of an int here).
Or with a double, the padding ensures that...