No, the joke is much older than that. It plays on the stereotype of the morally upright (usually but not always oafish, a hick, bumbling etc) father who is trying desperately to corral an uncontrolled, slutty daughter into morally correct and productive behavior. The shotgun wedding is the last ditch effort: "you're going to marry my daughter and
make an honest woman out of her or you're going straight to hell, you cad!" - desperate dads, probably (emphasis mine).
I agree that it's not funny at all when considered soberly (it's tragic for the father and rage-inducing as far as the daughter is concerned). Those who play it for laughs get a lot of cheap mileage out of how they choose to portray the situation (remember: the dad is usually an oaf, a hick, bumbling etc in the joke).