Nonlossy can be used for pixel perfect animations, lossy formats cannot.
> Because file size matters usually much more, than pixel perfect animation.
It depends. For video, that is true. For user interface, any glitch is distracting. Using JPEG for user interface images like buttons is in most cases a bad idea. Each format is useful in different situations.
> I wanted to convert a short screencast to a gif, result: hundreds of megabyte big monster, with crappy quality.
You are right, that is not a use case for GIF or equivalent formats.