Like most prohibitions it increases desire to do whatever is prohibited....
The "why' has to be strong... the use of hell...eternal damnation is found to be more powerful than the promise of heaven.
but from my experience in high school and beyond the "preacher's daughter syndrome" was more than a theory.
Everytime the church says don't watch this movie... a portion of the congrefation heads to the theater...
Fasting makes me hungry. I heard a wonderful talk from an Imam once...about working the fields during Ramadan...he was 14 in Egypt...when Ramadan was in August of all things...long days, lots of heat...his job was to irrigate the fields...walk a big circuit around and open the gates from the irrigation ditch to the fields and let the water run in and down the rows...and then onto the next and the next...and then back and close them when the water had reached the end of that field... all day sun shining down, surrounded by water and could not drink... he said..."With no one around...there was no one to see me...only Allah"...at the end of eveery day walking back to the house to arrive right at sundown so he could satisfy his thirst and his hunger. His "why" was and is still strong...
seems a form of isolation and separation (we do that...they don't..) whether it be fasting, or not eating pork, or wearing a head covering... also a form of connection...and accomplishment by staying within the requirements... a little ego feeds the soul eh?