Companies also take into account if the thing they're parodying is defacing the original property to the point that will ruin their business. If they are, they will sue. If not, then it's usually okay.
Also, if they're profiting off of someone else's franchise, that will bring up a lawsuit as...