When the story is important to you. When it fascinates you. That passion is tangible. The reader senses it. And, without even knowing why, gives you the benefit of the doubt. You still have to tell the story well, of course, and that still takes an enormous amount of effort and concentration. But: The huge collateral benefit of telling stories that genuinely fascinate you is this: forcing yourself to sit down and actually do the work is much, much easier than when you are merely writing something because you think it is marketable, can sell, is in a genre that’s currently in demand.
I like that read on an audience's ability to, conciously or not, suss out whether or not you really care about something. If they sense you're genuinely fascinated by something, they're gonna want to know why.