The sound you hear on the ultrasound is the machine translating electrical impulses from the embryo into what sounds like a heartbeat. It’s not a real heartbeat because, at that stage, an embryo doesn’t have a beating heart.
But to be totally fair here, McCain isn’t alone in this misunderstanding. Politicians in several states passed fetal heartbeat bills over the last few years. And I get the confusion. It’s really hard to explain to folks who think they’re hearing their babies’ heartbeats for the first time that it’s all just one big misunderstanding, but there’s a little less leeway when it comes to politicians and public figures.