That's why the 15th amendment was needed--Congress had already forced the former Confederate states to extend the franchise to black men, but some of the Northern states still restricted the vote to whites. After the 1868 election the Republicans realized that the small number of potential black voters in various Northern states could make the difference in a close election determining who won the electoral votes (and they could figure on all or nearly all of those votes being cast for the Republican candidate).
Also the Republicans were aware a law was less permanent than an amendment. Had they not forced through the 15th Amendment southern blacks would have been legally, as opposed to illegally, disenfranchised in the following decades.