The code uses Go's concurrency features to perform subdocument mutations in parallel, allowing for nearly the same performance as using bulk operators. By utilizing goroutines and a WaitGroup, the application can process multiple document IDs concurrently, reducing the number of network calls needed. Although performing hundreds of network calls may seem inefficient, this approach leverages the benefits of Go's concurrency capabilities to achieve similar performance to using bulk operators, while also providing more flexibility and control over the mutation process.