In 1969, The Beatles were practically over. Especially after their disastrous sessions in January, which eventually became the album Let It Be. The sessions were filmed with the intent of making a TV show of their recording sessions. In a way, they were pioneering reality TV. But the addition of cameras, as evidenced by Peter Jackson's documentary, The Beatles: Get Back, only served to sour their already deteriorated relationship. John Lennon Asked for Paul McCartney's Help Despite Their Estrangement.
When John Lennon returned to England, newly married and with a new song, his fellow Beatles were scattered. Ringo Starr was on set filming The Magic Christian, and George Harrison was away on vacation. But his best friend and long-time songwriting partner was home, so, of course, Lennon took the song to Paul McCartney. The song was the retelling of his and Yoko Ono's complicated journey towards getting married and their unconventional honeymoon. He titled it "The Ballad of John and Yoko". "It’s a piece of journalism," Lennon described it. "It’s a folk song. That’s why I called it The Ballad Of."
Source: Collider/Val Barone