Rules, laws, and logic help us set up a science fiction universe so that we can understand the story we're about to hear. But following the rules isn't very exciting, and you need excitement for people to want to see your show. And logic can be the enemy of creative storytelling. You can see how this works in the Star Trek image. We take the breaking of the Prime Directive for granted, even though we joke about it, because Star Trek would be boring if the Enterprise crew just wandered the universe observing alien civilizations like they are supposed to. Other examples just show a lack of thought.
There are 15 examples of how the science fiction we watch doesn't stop to consider logic at Cracked.