Each format has its advantages in different sitations - most of which have already been mentioned.
As for the gif thing, that patent expired june 30th - it was from the LZW compression algorithm used in making .gif files; companies had to pay Unisys when including gif capabilities into their software etc.
… but thats nothing to worry about now.