A lot of us write under pen names. My pen names aren't all that creative, just two versions of my real, legal name, and this can cause problems. When subbing to a market and signing contracts, I need to use my real name. More than once the editor has then assumed that the piece should be published with "Emily Mah Tippetts" on the by-line. I've had to request corrections to make sure that only "Emily Mah" appears.
Why do I bother with this? Pen names are a form of branding, in my opinion. E.M. Tippetts writes LDS fiction, meaning works with LDS characters and LDS themes. There's no swearing or graphic sex or violence. Emily Mah writes science fiction and fantasy. The characters could be any religion, or none. There might be violence or swearing or other material that wouldn't make the cut to be carried in the LDS bookstore chains - bear in mind, these cater to the most conservative Mormons. Within the religion are people who don't believe in steady dating until ones twenties, or in some extreme cases, no kissing until the wedding ceremony. These people have few places they can go shop for fiction, hence the strict standards in the LDS distribution outlets. More mainstream Mormons can and do just go to normal, national chain bookstores.
Hence, it's essential for me that I keep my Tippetts name off my SF and fantasy, even though as far as swearing and violence goes, it's pretty tame. People need to know what to expect when they pick up a book or story with one of my names on it. The lawyer in me knows that the editor needs to know my real name and this is what I must use on all contracts.
Ways other writers get around this include incorporating, and signing contracts on behalf of the corporation, which may bear the pen name. Some also just sign contracts with their pen name, which in the end of the day would probably not hurt their enforceability, but a seasoned editor will still insist on using ones real name. What's important, though, is to read the proofs carefully and make sure your name stays as you want it.
Perhaps the worst case I've ever heard of happened to my friend Brian Hiebert. A magazine bought a story, then published it with "Brian Herbert" on the byline. How awful is that? It leaves one wondering if they bought the story simply because they thought it was by Frank Herbert's son and this would improve sales of that issue of the magazine. (Though Brian, it was good enough to sell to them anyway, rest assured!)