The /usr/ucb dir was created to house the more BSD-like functions available for certains binaries while the other contains the standard SysV-style.

It's all artifacts; something that Sun folks know only too well (those pesky Sun developers are packrats, never throw any code away. ).

In any case, it all stems from Sun's rocky relationship with SysV unix (ATT Style) and the BSD flavor. I imagine too, that it helps to sell more Solaris boxes if people think they can get "their" version of 'ps' running.