By default, field PApplet::sketchPath would point to the “Current Working Directory” (CWD):
Unless a special “–sketch-path=” argument is passed to PApplet.runSketch():
I believe the PDE (Processing’s IDE) creates its own customized main(String[] args) which passes all of those custom args to the compiled sketch.
And when we override it by making our own main(String[] args), the PDE can’t pass “–sketch-path=” to our sketch.
And since the CWD is where the PDE is located, our sketch inherits that path.