It also reduces supply of many resources (for example noble gases since Ukraine is the world's biggest exporter and Russia is the second), leading to higher prices which Russia would profit from (neon prices went up 600% around 2014). In the current situation, they also didn't expect to have to wage a year or longer war or deal with crippling Western sanctions.