I think Biden was always planning to drop out and give Harris the opportunity But I suspect they waited until Trump had chosen a poor VP, so now they can really hit him where it hurts.
Until Biden dropped out, Trumps whole campaign was "he's an old man, he can't do the job" (despite being only 3 years younger). Now they've got stuck with someone with no experience, and they can't use their entire planned campaign strategy.
Instead, they are now up against a prosecutor who might be selecting someone who used to work for NASA as her VP. It's fucking genius.
I also read somewhere (probably Reddit, so not sure how true it is) that Trump selected Vance because he was a favourite of Musk, and they wanted Musk to carry on donating to their campaign.