The best writing just works, and it can be difficult to notice why. If a great author uses some literary device or technique, odds are she'll use it so well that we won't even see the device in the first place. We just plow through the book, enjoying the experience of reading great writing.
In contrast, when you're reading something that's merely good, you can see the devices and techniques used. And with bad writing, you can see their misuse.
It's easy to get absorbed in a great book and fail to analyze why it's great. But it's hard to read a mediocre book without thinking about why, exactly, it's mediocre.
What does this mean? It means we learn more from reading writing that's not all that good.
What is it about this line of dialog that makes it sound wrong? What is it about that plot device that fails? Why is the author forced to use a MacGuffin at this point in the story? What--specifically--makes the plot predictable, boring or implausible?
Once you start thinking about the structural defects in the things you read, you'll entirely rethink bad work. Look for the mistakes, learn from them, and protect your work from being bad.
PS: Try this with TV shows, films, music, photography, painting... practically any artistic discipline.