Hi everybody- interesting discussion!
As explained in detail in 'Manhunt: The 12-Day Chase For Abraham Lincoln's Killer' by James L. Swanson, it wasn't the fact that Dr. Mudd rendered medical assistance to Booth that got him in trouble with the Feds- it was the fact that, even after encountering Federal authorities in his town who were searching for Booth, he failed to notify them that the man they were searching the town for was back at his house resting (he was, therefore, as soon as he heard the news of Lincoln's assassination and that Booth was the prime suspect, knowingly harboring a wanted fugitive).
And the argument that Dr. Mudd "didn't recognize Booth" has been proven false by historians; prior to fixing Booth's leg, Dr. Mudd had met Booth at least twice before, and Booth had even been his overnight houseguest once. Dr. Mudd probably didn't know that Booth was wanted for the President's murder that night when he treated his leg, but he certainly discovered that fact pretty quick when he went into town the next morning and encountered the soldiers (rather than informing on Booth, though, Dr. Mudd rode back to his farm and angrily ordered Booth and his accomplice, David Herold, to clear out).
So Dr. Mudd was arrested, charged, and convicted for harboring a known fugitve and lying to the authorites, not for being a good doctor and treating a broken leg. One has to feel sorry for Dr. Mudd, though- he was probably scared that, given his past association with Booth, Federal authorites would think he was an assassination conspirator (which he was not) and that the Feds would probably hang him (they nearly did anyway) if Booth was discovered recooperating at his house.