When you use a boolean, and then apply it, it's actually changing the geometry to join the two shapes. There's no way to change geometry that already has UV maps without also altering the UVs. So you've altered the UVs when joining the shapes. Also, Blender decides which of two shapes will inherit altered properties from the other based on selection order. The most recent item added to a selection of more than one object is always the active object, which will always be the one that property transfers are made from, with all the remaining items in the selection being the recipients of the transfer.
Two separate cubes, each with a different material. Their UV maps are shown to the left. While each UV map has exactly the same layout for both cubes in this scene, those UV maps don't exist in the same UV space because the cubes are currently separate objects. What is shown here is for illustration purposes, but not normally how the maps appear for objects, as neither of these objects are currently in Edit Mode. Normally, an object must have its parts selected in Edit Mode before its UV map will be shown in the UV Editor window.
This is the same two cubes after applying a boolean join operation in which the original red cube was added to the selection last. That is why the new cube is now red, because it inherits its material properties from the active object. If the white cube had been selected last, both cubes would be white instead. Notice that the old UV arrangement is now destroyed. This would be the case after performing this operation regardless of selection order. This is a consequence of applying the boolean modifier, which moves the modified result from a non-destructive outcome to a destructive one.
As a good workflow practice, it isn't recommended that you do booleans after getting your materials and UVs set up the way you want. Boolean operations are a part of the modeling phase, and should probably be kept there.