How was I able to remove a root owned file without sudo [duplicate]

In this case there are important write permissions on the directory, where the file was. So if you can write the directory, you can also remove files there.