I guess the democrats think he'll drain votes away from Trump more than Harris after the endorsement. I'm not so sure, ...
You are giving Democrats too much 'thinking' credit. I don't think they think that deep.
The goal of Democrats in any election is chaos, confusion, and disruption. The idea that the RFK name on the ballot would confuse people, even on a minor level, is enough to cause the Dems to want him there. Democrats are dirty filthy people who care nothing about rules, or laws, or basic human honor and dignity. Anything Democrats can do to steal a vote they will eagerly do it, with a frothing mouth.