There's nothing wrong with throwing inside. It forces batters to back off the plate, which allows you to then work the outside edge of the plate (which is a good place to work).
In fact, the rules of baseball say that a ball that hits a batter while their body is in the strike zone is a strike.
However, I don't think it's right to intentionally throw at batters just for the purpose of hitting them (rather than backing them off the plate). It's also illegal according to a new rule in the rules of baseball.