Call it "legacy code" if you'd like. That specific part is from a less common feature for setting options when running on a Selenium Grid. The new CDP Mode isn't compatible with The Grid (since CDP Mode makes direct CDP API calls without making Selenium API calls).
It's clear, it's intuitive, it's easy to understand on first glance, it's a single purpose function, it's easy to step through.
you don't have anything to defend here.