This was added in OpenBSD in 1997 by Theo de Raadt.
Back in the days, software developers used to use things like pid as a source of entropy, leading to all kind of bad things™, but nowadays, …
It is not the responsibility of the operating system to protect its users against software which assumes using the pid as a random source is a bright and wise idea.
Grsecurity had this feature too since May 2001, and removed it somewhere in October 2006, in grsecurity 2.1.10:
Removal of randomized PIDs feature, since it provides no useful additional security and wastes memory with the 2.6 kernel’s pid bitmap
I don’t think that this brings any additional security, as I haven’t seen a single exploit that could have been thwarted by this, but why not.