Shrinkage of epoxies during cure is almost always due to a combination of thermal and cure shrinkage. In light-cured systems, the resin can absorb a significant amount of thermal energy while it is liquid. The liquid resin will expand upon heating and begin to set in this thermally-expanded state. When the lamp is removed, the temperature returns to RT and the resin begins to shrink. If the polymerization is not building sufficient strength during this post initiation cure phase, cracks will result. If the polymer is of sufficent strength to withstand the thermal stresses, those stresses will be 'frozen' into the final fully cured product. Post cure cracking in this case will be a slow process but it can still occur.
The bubbles and other holidays in the final cured product can arise from a variety of causes. If the substrate is porous and contains volatiles, these can manifest during cure or post cure. Solvents from the uv cure package that one mixes into the resin can be a source of bubble-type holidays as well. If the UV cure agent is present in too high a concentration, it can shield underlying resin in thicker areas from the UV and those areas might be poorly cured or not cured at all just under the surface.
Cure shrinkage itself is due to the crosslinked polymer having a smaller molar volume than the uncured resin, as Danger has indicated. Acrylics tend to have the highest cure shrinkage of the polymers I am familiar with. I believe that acrylic acid itself has a cure shrinkage of approximately 20%!