Because losing your franchise is one of the consequences of conviction of (many) crimes in the United States.
Eligibility to run from prison is most likely an oversight in the design of the electoral systems; until you're confronted with the reality of it, who on earth would imagine it to be practicable?
There is an argument for continuing to allow it, however: Presumably voters will be able to tell the difference between someone who has been jailed for actual criminality and malevolence, and someone who has been jailed as political persecution - in which case, they should be empowered to overrule the arresting authority by electing that person to office.
The lack of a Federal law guaranteeing voting rights to prisoners is part of the fractured, federalist system the United States inherited from its inception: voting eligibility, and the administration of elections are handled by state governments, and with only a small number of exceptions the Federal government keeps its hands off. And those exceptions have recently been curtailed by the Supreme Court.