Strictly speaking, it would generally not be laws (statutes), but a state constitution which governs voting qualifications, but statutes may clarify the implementation of the constitution. For example, article II of the Iowa constitution deals with "suffrage", saying (among other things):
Disqualified persons. Section 5. No idiot, or insane person, or person convicted of any infamous crime, shall be entitled to the privilege of an elector.
Thus by that wording, voting is considered a privilege, not a right. Note that constitution does not define any of the terms "idiot", "insane person" or "infamous crime". In cases like these, courts get called on to interpret the constitution, and in 2016 the Iowa Supreme Court did just that in Griffin v. Pate, saying that:
This appeal requires us to decide if the crime of delivery of a controlled substance is an “infamous crime” under the voter disqualification provision of the Iowa Constitution. The district court held the crime is an infamous crime, and a conviction thereof disqualifies persons from voting in Iowa. Following the analysis we have used in the past to interpret provisions of our constitution, we agree and affirm the judgment of the district court.
The term “infamous crime” was generally recognized to include felony crimes at the time our constitution was adopted. This meaning has not sufficiently changed or evolved to give rise to a different meaning today. In addition, unlike some past cases when we have interpreted provisions of our constitution, the facts and evidence of this case are insufficient to justify judicial recognition of a different meaning. Constrained, as we must be, by our role in government, we conclude our constitution permits persons convicted of a felony to be disqualified from voting in Iowa until pardoned or otherwise restored to the rights of citizenship. This conclusion is not to say the infamous-crime provision of our constitution would not accommodate a different meaning in the future. A different meaning, however, is not for us to determine in this case. A new definition will be up to the future evolution of our understanding of voter disqualification as a society, revealed through the voices of our democracy.
Nothing in this interpretation prevents the Iowa legislature from more precisely defining which crimes are "infamous", nor does the that constitution say that the disqualification is permanent, only indefinite; in Iowa, a convicted felon can seek restoration of his voting privileges by applying to the governor.
An official statement after the verdict said:
"When I took the Oath of Office in January, I swore to support the Constitution and the integrity of Iowa's elections. That includes efforts to insure elections are not diluted by ineligible voters." - Paul D. Pate, Iowa Secretary of State
Please note I'm not supporting or opposing secretary of state's position on this, just attempting to addressing the question of why: because the drafter's of that's state's constitution chose to consider some people disqualified to vote. If you want more detail on the arguments, there is a video of oral arguments available.