Mistress Alexandra wanted this girl to realize that having a bad attitude was something that was going to cost him a lot. And hence she used her whips to punish him and make him realize that if he ever pissed her off, he would have himself to blame for what happened. That is how the mistress made him change from having a bad attitude to having a good one in no time.