Why is Union Subdividing objects?
When you join object A to object B the modifiers of object A are NOT applied, and just get deleted, but the modifiers of object B stay the same and therefore are influencing object A once joined.

For this reason modifiers should usually be applied before joining objects.

On the other hand smooth and flat shading shouldn't change since this kind of data is attached to faces rather than the whole object.