Memory-efficient APIs. Garbage-collection is great when you don’t care about when the memory is freed, and an intractable problem when you do.
In particular, getting ImageData from a MediaStream (local webcam, remote feed via WebRTC, captured from a video using HTMLMediaElement.captureStream(), etc) can generate a lot of garbage if you’re doing processing on each frame and don’t care about it once you’ve processed it. Trying to process 1080p@30 FPS will generate 230 MB/sec of discarded ImageData objects, which is a lot. 4K@30 FPS would be nearly 1 GB/sec.
Leaving it up to garbage collection leaves web developers at the mercy of the implementation. With low-spec devices this often isn’t up to snuff.