Does an electron's spin change when being excited? My preconception is that when you fill an empty orbital by exciting an electron (with a photon), the empty orbital should be filled by an electron with the same spin. However, I've seen examples of that happening and not happening. For example, on this University of Calgary
web page there is an image of the electron spin being flipped:

The lowest energy transition is that between the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) in the ground state.  The absorption of the EM radiation excites an electron to the LUMO and creates an excited state. The more highly conjugated the system, the smaller the HOMO-LUMO gap, DE, and therefore the lower the frequency and longer the wavelength.


Does it just not matter that much energetically?
The picture shows a triplet excited state returning to the ground state by emitting a photon, i.e. phosphorescence. This can only happen if there is also an interaction that couples angular momentum change with the transition, such as spin orbit coupling.
The electron has two quantum numbers; the spin $S=1/2$ but is not the spin of the electron that is changing but the other quantum number 'z' , 'azimuthal' or 'magnetic' spin quantum number $m_z=\pm 1/2$.