9mm can penetrate well into human flesh and beyond, there is a always a risk of that bullet flying out and hitting someone else which I highly doubt this guy took into consideration in the moment.
Nevertheless, I agree with the charges. Not guilty for defending himself but guilty of firing in an occupied dwelling.