Because they got tired of oppressing south.
South was also tired of military rule. As the South got more and more upset about the military rule, North came under more pressure to end it.
The only reason for military rule was protecting the black rights. Most of the North didn't care abot black rights.
This was the reason why reconstruction ended.