Decode, re-encode, download
The browser reads the source file and decodes it into raw frames with WebCodecs, then encodes those frames again at the codec and bitrate the tool is set to, and hands the result back as a download. Because the video is decoded and then encoded again, every pass costs a little quality, even at the same bitrate - re-compressing an already-compressed file never quite matches the original.