Why in the browser and not on a server
Most online converters work the same way: you upload the file, a server processes it, and you download it again. That means waiting for the upload, trusting whoever holds the file, and living with whatever size limit the service imposes.
None of that happens here. The browser already knows how to decode and encode PNG, JPEG and WebP, and the rest arrives as libraries loaded into the page. The file goes nowhere: it is opened, processed and saved from the same tab. You can even pull the network cable once the tool has loaded.