Hartley was sent off in the Aviva Premiership final for verbally abusing referee Wayne Barnes and the subsequent ban cost him a place on the British and Irish Lions tour.
The 27-year-old England hooker has also served lengthy suspensions for biting and eye-gouging and Mallinder had to think long and hard about whether to stick by him as club captain.
"We didn't jump to it [the decision]," Mallinder said. "We took a lot of time to decide what was the right thing. I spoke to a lot of people, the coaches and a lot of the senior players and Dylan for a long time.
"He has captained the side for the last four seasons and he is an outstanding leader. He is not too old but is very experienced and we decided he was the right man to takes us forward.
"In big games in front of 80,000 people there is a lot of stress on everybody concerned and what happened shouldn't have happened but we all make mistakes. We learn and move on and make sure our mistakes don't happen again.
"If you look at what Dylan lost, it is massive. He was very conscious of his contribution and how it affected the side on that day - he is very aware of that.
"He is very aware of missing out on the Lions tour, which would have been a once-in-a-lifetime trip with a good chance for him to start in one or more of those Tests.
"He has gone through it - it was a hard lesson to learn but I think he will learn that lesson."
The England management also speaks highly of Hartley's leadership qualities, but that reputation sits at odds with his chequered disciplinary record.
Mallinder suggested the best players are always liable to step over the mark because of the intensity and passion with which they play - but he has emphasised to Hartley the importance of toeing the line.
"You don't want any of your players overstepping the mark but history tells us that some of the very best players occasionally do go over the edge a little bit," he said.
"You don't want that - you want them to play on the edge but not over it. Sometimes they push it too far.
"He is a top-class international hooker and he is still relatively young in terms of that position and I see him getting better than he is now.
"He has had to cope with a lot in the past. People have always tried to wind him up and make him react. He has had that in the past and he has reacted really well.
"I can think of some really big European games where we have come up against teams who have clearly targeted him and he has coped. He has turned the other cheek and carried on and he needs a bit more of that.
"He needs to understand where he is and just get on with his job."