It was largely motivated by Jim Crow state gun control legislation directed against blacks, who needed to defend themselves from the whites. It was intended to settle a longstanding dispute as to whether the original Framers had intended the Bill of Rights to apply to the states. Actually, they had, although during debate they limited the 1st Amendment to the Congress, because some states did have established religions. The 14th says nothing about extending federal police power over the states, but does support federal criminal laws against violation of the civil rights of citizens of either kind by any official, national, state or local, such as 18 USC 241 and 242, which is what a lot of federal officials have been violating lately. This is a step forward for the cause of constitutional rights, in that previously the national government had no authority for prosecuting its own officials for offenses they might commit on state territory, including violation of their own oaths of office to uphold the Constitution, and now it had.
Enforcement is another matter, of course.
Incidentally, the 14th implies equal rights for women and native Americans, including voting rights. Took the courts and a couple of further amendments a long time to figure that out, though. It seems that judges, like most lawyers, are a bit weak on logic. There are some problems with federal jurisdiction today, of course, but the legalistic rationale for that is not the 14th Amendment. As far as I can tell, there is no rationale.