Morally, attacking civilians is wrong. It's wrong when Russia does it, and it's wrong when Ukraine does it.
Practically, when one side attacks civilians enough times, flagrantly enough, deliberately enough, the other side gets really tempted to respond in kind. It's basic human nature. They'd have to be saints not to, and you don't find many saints in wartime.