There is code in wdio.conf.js to only take screenshots of failed tests.
For a while now, test.passed is returning undefined, so screenshots are taken for both passing and failing tests. The change probably happened when we upgraded webdriverio to v5 or v6, but nobody noticed it.
I actually like the current behavior. We take videos for both passing and failing tests, so it makes sense to take screenshots too. Both screenshots and videos are small files. (The biggest screenshot is 539 KB, the biggest video is 21 KB.)
If we insist on only taking screenshots for failed tests, this is how to do it. (According to Testrunner Configuration.) The only change is in lines 2 and 4.