Save a Horse, Ride a Cowboy
A great philosopher named Paula Abdul once said that opposites attract. If that's true, then Jack Twist is Paula Abdul and Ennis Del Mar is MC Skat Kat.
Ennis is happy just going about his business: herding sheep and saving money for his wife and kids. But Jack Twist is a literal twist in the plot of Ennis's life. Author Annie Proulx says the character of Jack Twist got his last name from the "strength of thighs and butt" a bull rider must have. (Source)
But once we stop thinking of Jake Gyllenhaal's Wrangler-clad butt, the name takes on an even deeper meaning.
Jack also actively twists Ennis's life. He's the initiator. He's the one who wants the relationship with Ennis. He appears to be more experienced with men, because he sizes up Ennis as soon as they meet, and he's the one who initiates their first sexual encounter.
Film critic Gene Shalit was criticized for calling Jack Twist a "sexual predator." But Shalit misinterpreted this character, because Jack isn't offering anything Ennis doesn't want. (Source)
However, the movie does portray Jack as a teensy bit of a bad boy. He wears a black cowboy hat, which is the classic bad guy's fashion statement of choice. And he refers to himself as a sinner, to which Ennis responds,
ENNIS: You may be a sinner, but I ain't yet had the opportunity.
Wardrobe choices and religious discussion aside, Jack's just a man who wants a life with someone he loves. In Jack's case, that someone happens to be a man. However, what does Jack see in Ennis Del Mar, who's as emotionally repressive as Jack is expressive? The sexy way he mumbles every word? His violent outbursts?
We're not sure, and sadly, Jack doesn't find out how unhealthy his relationship with Ennis is until it's too late. Their romance is a one-way street, and is too confined to succeed:
JACK: Tell you what, we coulda had a good life together, f***in' real good life, had us a place of our own. But you didn't want it, Ennis! So what we got now is Brokeback Mountain. Everything's built on that. That's all we got, boy, f***in' all, so I hope you know that if you don't never know the rest.
For all of Jack's planning and wishing, the romance between them gets boiled down to a few clandestine camping trips a year—before, of course, leading Jack to a literal dead end.
It's okay to cry a bit before we move on.
There's a ton of literature that punishes a woman in order to teach the man a lesson. Think of any movie in which a man has to take revenge against someone who killed his wife.
In the narrative, Jack's death occurs to give Ennis what TV Tropes conveniently dubs "collateral angst." The audience isn't expected to mourn Jack, as much as they're supposed to feel sorry for Ennis for losing him. We don't see Jack's death—we only see Ennis's reaction to it.
This trope is common in stories with heterosexual relationships, but Brokeback Mountain proves that this trope can be put to good use in literature that examines homosexual relationships, too. It's grim (nothing fun about dead sweetie-pies), but it's one of the reasons that Brokeback was such a landmark movie in the 21st Century movement of LGBTQ equality. (Source)
In Brokeback, Ennis lives. Jack's death teaches Ennis a lesson about being closed emotionally, and Ennis attempts to make amends with his daughter as a result. Good for him.
Ennis may be sad, but at least he is still alive to shed tears. Jack's dead. Jack attempted to live his life honestly, and he was killed as a result. With Jack's death, Brokeback Mountain reinforces and legitimizes Ennis's fears, rewarding his closed-off stoicism and punishing Jack's openness and relative fearlessness.
But let's remember that this doesn't just happen because Brokeback's following the guidelines of how to best use collateral angst. It's also portraying this deeply unfair situation—he who is best closeted wins—because that was the disgusting reality of life in the 20th Century American West: openly gay men were the subject of numerous hate crimes. (Source)