Understanding paint depth & opacity in p5js & webgl

Not sure, but could it be related to depth testing?