Mormons are really keen on marriage and families. We believe that those are hugely key things for human happiness, because they can be forever, and that's why they play a big part in God's plan. So it is peculiar that this church would then take its young people aside for a few years at the age when they are just coming to start thinking about those kinds of things more seriously - and tell them to not think about it for a few years on their missions. These young people agree to do that, and they do it - with varying degrees of successfulnes.
What is the reason for this? Perhaps it is a question of developing self-control or a deeper, more abiding love for humanity (acquired when you stop thinking about half of the population in terms of romance); or maybe it's just about putting another thing of distraction out of your mind in order to be more fully dedicated to serving. Whatever the reason, just like with all of God's commandments (except tithing), you can't expect a perfect score from people. And we don't either.
So here comes a missionary secret: missionaries do actually think about the opposite sex. You have elders who flirt, sisters who flirt, elders and sisters who flirt with each other, elders who are interested in other elders (I haven't heard fo sisters having same-sex attraction stuff on missions, but maybe it exists?) and then all sorts of horror stories of missionaries who actually
do some kinds of inappropriate things. In my mission I heard only a couple of rumours of inappropriate things, nothing tangible and no one who actually had to finish their mission because of it.
The actual rules only talk about inappropriate relationships and breaking the Law of Chastity (breaking of which is really serious for any mormon, and even more so for a missionary, who live a 'higher law' because of their calling). The main point of these rules is staying focused on the work, being worthy to have the Spirit with you (because a missionary who doesn't have the Spirit, can't work the right way) and keeping safe and away from danger. There isn't anything that says that missionaries aren't allowed to hug, for example, but it is more like an ingrained habit, a part of culture to think that. 'Keep out of harm's way' is pretty much the main missionary rule.
Then there's this thing called "Lock Your Heart". That's supposedly what the Prophet (can't remember which one) has said to missionaries, that that's what they are supposed to do. I hadn't even heard of it until the MTC. Eventually, after reading the talk from which it came and deciding for myself, I considered the whole thing rather exaggerated and kept my heart wide open :P I just have this strange relationship with attraction and love. To me it's an interesting powerful force to make me work - but since I'm even in normality the kind of person who likes to admire from afar and never let the object of attraction even have a clue, I figured it was okay for me to be falling in love with everyone all the time even as a missionary, because it doesn't make me do dumb things. And I think it did work for me. I do understand however that it might not work for everybody: some people go all mushy from a crush, or obsessive, or do stupid things or stop functioning properly...
And even despite the locks on the heart, there can be stuff. And there is the appropriate way to deal with such stuff. If a missionary finds themself seriously attracted to someone in their area, discussing it with the mission president will pretty much definitely fix things: whether it be just talking about it and working out a way to focus anyway, or getting moved someplace else, or whatever the president says. That's the honourable way to go about it, honestly admitting "I'm a bit distracted here." Problems arise when you try to hide things.
A whole different thing completely (related to this) is the more common, casual thing. Some companionships talk more openly about things, including the people they meet. I had companions with whom we talked about everyone (members, investigators, other missionaries, friends from home) and their cousins, even in a romantic way. I think up to a point it is a way to build unity in a missionary companionship, sharing thoughts and feelings, and having fun. That way you can also act as checks for each other: "she knows I like Torbjörn, so she'll notice if I do or say anything stupid."
A more baffling, difficult-to-d
eal-with effect was the reverse, when someone else was attracted to the missionaries. Whether this was expressed or only read from clues, the result was always really awkward. Like it says in the Legacy-movie: "Don't go and join the mormon church because of a pretty face!" Being attracted to is the last thing missionaries want, because it casts a shadow on the person's conversion and won't create a lasting spiritual effect on the person. When the missionary gets transferred, the person might lose interest.
It's not uncommon for people to get interested in the church because they are interested in a member of the church (especially if said member says they are not interested in the person because of the church) and there is nothing wrong with that. Anything can spark an interest. It's simply a question of whether the person will stand on their own feet on the matter later. I'm sure we taught people who first asked us to come because we are young and attractive - but I'm also sure that they either felt the Spirit and found something worth searching seriously, or that we stopped visiting if they didn't.
One more different thing related to this takes place after the mission. It happens sometimes that people who met on the mission (when one or both were missionaries) get married afterwards. That always causes some raised eyebrows and knowing glances, usually with a mutter of "somebody didn't keep their heart locked" or something like that. Y'know, the worst kind of "nudgenudge knowwhatImean". I actually feel rather graceful about that and I don't see a problem with it (and not simply because I was in love with everyone all the time on my mission).
God's plan is to have people marry and have families. Whether said people meet in BYU, a church dance, or in Zone Conference is probably not that significant to Him. We're talking eternity here. Life is but a twinkling of an eye in eternity. Two years or less on a mission is such a short time (everyone who has served a mission knows this). I definitely agree that one shouldn't waste this precious short time of dedicated service by doing things that are off the programme, but I also feel that somethings happen during missions that aren't described to be on the programme, but need to happen anyway.
A mission is a person-refiner. I got some interesting insights into men and women, gender, love and attraction on my mission, and I'm really happy about that and going to be putting them to use in art and life. And if I end up marrying someone I met in Sweden - it's fine by me. I know I did my best out there, and I'll give every returned missionary the same benefit of a doubt.