Why do you think back catalogs of nucleoside analogues exist?
Also, sure it was patented earlier than remdesivir, but patent term is 20 years - GS-441524 has 9 more years on patent. Plenty of exclusive value that Gilead can extract.
There's plenty of arguments against patents in software and other innovations. But not many people complain about it for drug research where the timelines and type of research actually make sense for such a system.