it's just marketing/branding... the more you're pushing your message, the more it sinks into people's heads.... to be fair, those who have already decided one way or the other won't be swayed much by ads on youtube or tv, etc.... but those who are undecided or lukewarm in supporting a candidate might be swayed by it... and no one wants to vote for someone they think no one else is supporting... so having a strong marketing campaign makes it seem as if the candidate you're planning to vote for is also being supported by a lot of other people too....
i forgot, money also goes into a campaign's get out the vote effort (knocking on doors, phone calls, texts, engaging on social media, etc.), campaign rallies to fire up the base, yard signs, mailers, polling to see what messages resonate and what messages don't, and much, much more...