Lots of scripts go through changes before they hit the big screen, and in the case of Beetlejuice, you can actually read some of the early drafts online and see how it seriously changed during development.
Michael McDowell originally wrote Beetlejuice (with story help from Larry Wilson) back in the mid 1980s. They sold the script to the Geffen Film Company and then kept working on drafts until Tim Burton got interested in the movie. It was then that the basic story finally started to take shape.
McDowell's original screenplay was… um… different. It featured two Deetz children: sixteen-year-old Lydia and nine-year-old Cathy. Betelgeuse was a winged demon. You also didn't need to say Betelgeuse's name three times to let him out—you just had to dig him up. Betelgeuse also wanted to rape Lydia instead of marrying her.
Yeah. So… fun for the whole family.
Larry Wilson, who was working at Universal Studios at the time, actually said that one of the executives there took him aside and told him that the Beetlejuice script was reflecting really badly on him. He was told, "This piece of weirdness, this is what you're going to go out into the world with?[…] Why are you going to squander [your career] for this piece of s***?" (source).
See? Big shot executives get things wrong sometimes, too.
A new draft by Warren Skaaren made some changes. He dropped the Cathy character and made the afterlife into more of a bureaucratic cliché. He also suggested that, when Adam and Barbara tried their hand at spooky antics, R&B music should play in the background. In the final movie, this was changed to the Harry Belafonte music, but you get the idea.
What's the moral of the story? Writing stuff is hard. Sometimes it takes a lot of vision and determination. Sometimes it takes a village. And if the first draft of your screenplay involves a rapist/villain who looks like a winged demon, you might want to keep revising.