Why can you not combine resistors in series when there is a voltage or current source between them?
The simple answer is it depends on whether you need to know anything about the original nodes between the components.

If you don't need to analyse specific nodes within the series circuit, then you can lump them together. For example if you look at the left three components in the linked question (R+L+source), and you are only interested in the voltage between the right hand node of both the resistor and inductor, then yes you can combine them. The order of components in a series circuit is irrelevant to its operation.

However, if you want to know the voltage at each node in the original circuit, then you cannot rearrange them because although the circuit remains functionally identical, you lose the information about specific nodes in the original circuit.