They usually work where jpg and png images work too, most importantly in most places where you render Markdown. No matter how more efficient a real video file would be, often a short gif right there in the README.md is the perfect way to convey a piece of information.