In the 60s the black population was rapidly increasing and groups like the NAACP were working to politically organize them into a cohesive force. There's endless quotations from the time about LBJ being concerned about them and fearing that they could become a major political force. From his exact quotes he was worried about losing the filibuster, so I assume that translates to him thinking they might be able to start winning Senate seats in states with high black populations.

So then he passes the Civil Rights Act in July 1964, then the Food Stamps Act on August 31st 1964, and then there's the election. The black turnout for the election ended up being 58% with something like 94% of their vote going to him, giving him a landslide of an election victory. So what he was saying wasn't just trying to convince people, as it's often been reframed - he was simply being a realist and was 100% correct.

The guy was a massive racist and segregationist for most of his entire political career. But more than anything he was a professional politician who wanted power. And he did what he thought could get that power. This [1] Snopes article includes many of his 'greatest hits' and tries to conclude with an argument claiming that he wasn't mostly fixated on claiming the black vote, but it makes no sense. Apparently in reading the headlines about the Civil Rights Act he was found in a melancholy state and when asked why he said, "I think we just delivered the South to the Republican party for a long time to come." That was obviously him being worried that his calculations might been wrong, but they weren't - he won 44 states in the election.

[1] - https://www.snopes.com/fact-check/lbj-voting-democratic/