Answer by taking a quote from the following article:

Sonny & Cher were an American pop music duo, actors, singers and entertainers made up of husband-and-wife Sonny and Cher Bono in the 1960s and 1970s. The couple started their career in the mid-1960s as R&B backing singers for record producer Phil Spector. The pair first achieved fame with two hit songs in 1965, "Baby Don't Go" and "I Got You Babe". Signing with Atco/Atlantic Records, they released three studio albums in the late 1960s, as well as the soundtrack recordings for two unsuccessful movies, Good Times and Chastity, with Cher contributing vocals to one cut, "Chastity's Song (Band of Thieves)" .

In 1967 Sonny and Cher released their third album, In Case You're In Love. It peaked at number 45 in the U.S. charts. It contained two hit singles, both written by Bono, "The Beat Goes On" (No. 6 on the Billboard Hot 100) and "Little Man" (No. 21 on the Billboard Hot 100), that peaked at the number one in five European countries.  In an attempt to capitalize on the duo's initial success, Bono speedily arranged a film project for the duo to star in. But the 1967 feature, Good Times, was a major bomb, despite the efforts of fledgling director William Friedkin and co-star George Sanders. After Good Times flopped in 1968, Columbia Pictures immediately sold rights to their intended follow-up film Speedway to MGM. The couple were replaced by Elvis Presley and Nancy Sinatra. In 1969, another film, Chastity, starring Cher, written and produced by Sonny, was also a commercial bomb.  Sonny and Cher's career had stalled by 1968 as album sales quickly dried up. Their gentle, easy-listening pop sound and drug-free life had become unpopular in an era increasingly consumed with the psychedelic rock of the evolving landscape of American pop culture during the late 1960s.  Bono decided to forge ahead, carving a new career for the duo in Las Vegas resorts, where they sharpened their public persona with Cher as the wise-cracking singer, and Bono as the good-natured recipient of her insults. In reality, Bono controlled every aspect of their act, from the musical arrangements to the joke-writing. While success was slow to come, their luck improved when network TV talent scouts attended a show, noting their potential appeal for a variety series.  Sonny and Cher also welcomed their first child, Chastity Sun Bono, born on March 4, 1969.

What happened when the project failed?
After Good Times flopped in 1968, Columbia Pictures immediately sold rights to their intended follow-up film Speedway to MGM.