It's probably different for different people. Some people are exibitionists, they would actually enjoy sharing their private lives with readers.
Personally, I never even kept a Personal Journal, so it's not likely that any of my stories would contain blow-by-blow personal accounts or conversations. I'd get really pissed off if my ex wrote and posted anything of personal nature. He doesn't write, thankfully
On another hand, ANYTHING we write does represent ourselves, made-up or not. Sure, I have Draco talking to Pansy in the story, but, well, isn't it like Myself talking to Myself inside my own head? Because there is no Draco. Or Pansy.
As for "write what you know," well, I don't know about dragons or magic or time travel. Noone does, ha. I believe in: "write what ever the heck you please" theory.