We simply don't know whether the hospital was targeted of whether it was hit in error.
There is intense electronic warfare happening where enemy missiles are both intercepted or diverted electronically off target . There are few reports about other targets and if the Russian claim that it took out foreign war tech experts/ tech centres in its Kiev attack.
War is not a moral argument but rather politics by force so its futile to argue the right/wrong..good/bad of this war.
We saw what war recently did to Syria and Gaza...it always has a fair share of "collateral damage" ....... that's normal and why refugees flee as they have already done so from SE Ukraine.