I feel writers love to be by themselves so their creative juices can flow without any hindrances.They sit endlessly on their computers or with their notepads pouring out their imaginations. God save anyone who comes and disturbs their chain of thoughts during that time, they can really get super creative in showing their irritation and using adjectives to shoo away the person or thing that made their muse run away from them.
They are also opportunistic. They look out for incidents or people who can inspire their writing. Anything out of the ordinary happening in the subway ride or outside of the grocery store or at a large gathering is of immense interest to them. They love anomalies.
They love to eavesdrop at Starbucks or beauty salons where they can overhear someone venting out their emotions. Then they add more passion to it and present it in the garb of fiction.
This is a fact and I think a universal one too. Most writers get inspired by real life as LIFE is the best teacher.