One of the biggest issues fans have with The Legend of Korra is the lasting legacies of the characters from Avatar: The Last Airbender. Certain members of the Gaang's lives took unexpected, even controversial directions, and chief among them is Republic City's Chief of Police, Toph Beifong. Toph's transformation from a girl who hates rules to a woman who enforces them felt jarring, leaving certain fans feeling as though the character's legacy was tarnished. However, Toph's surprising character development makes more sense than it gets credit for.
Understandably, Toph has a bit of an issue with being told what to do when she joined Team Avatar. Prior to her introduction to Airbender, she'd lived her entire life with her overbearingly strict parents who allowed her little to no freedom. Naturally, Toph's perception of "rules" is therefore that they are a means by which to restrict a person's freedom. This critical but understandable misinterpretation of the point of rules is what has her running scams on people or destroying houses that don't belong to her -- she believes that to be free is to do whatever she wants, whenever she wants, and that consequences are unjust.
However, Toph's stance on the notion of living by rules has clearly changed between the ending of Airbender and her legacy in Korra. This change was most likely brought about by her time on the front lines in the final showdown against Ozai. Even blind, Toph could grasp the sheer destruction of Ozai's plan to burn the Earth Kingdom, her home, to ashes. Ozai's rise to power and devastation of the Earth Kingdom is proof of what happens when the wrong person lives the way Toph lives, doing whatever they want with no regard for consequences.
By becoming Chief of Police in Republic City, Toph seems to understand that while rules that restrict freedom are wrong, rules that keep people safe and hold people accountable for their actions are worth fighting for. Toph likely doesn't even see being a police officer as enforcing rules, but rather as a way to keep people safe and prevent the birth of another Ozai. Her growth from rebel to cop in Korra isn't a betrayal of her character from Airbender, but proof that she has grown, not just physically, but as a person. While it's a stark contrast from her wrestling days, Toph is her best self as a police officer.
A fighter to the core, the end of the 100 Year War likely left Toph searching for something new to fight for. In the early days of Republic City, there was surely no lack of criminals trying to sabotage Aang's legacy by causing trouble in the city, giving Toph an excuse to whale on someone once again. It seems like a natural progression from there that Toph would become a police officer for this burgeoning metropolis. It probably also helps that, as a police officer, Toph gets to boss people around, which she has always been a big fan of doing.
As evidenced by Zuko's betrayal of Katara and Aang in Ba Sing Se, a story is always more interesting when a character makes an unexpected choice. Toph's transformation from a rebel runaway to the esteemed Chief of Police is certainly not where many fans would have guessed her character arc post-Airbender would take her. As the first metalbender, Toph would have been the perfect choice for restraining criminals anyway, regardless of their bending abilities. While The Legend of Korra may not be perfect, it stays true to the characters of the original series while still managing to surprise fans. Whether fans generally liked the surprises or not is a different story.