One writes what one lives, even if not in a literal way. Someone who has gone through an unhappy love tends to describe unhappy loves, even if they have nothing to do with their own.