Why PS does differ between PKCS1 v1.5 padding for signature and for encryption? As you may know, PKCS#1 defines two different padding in it's v1.5 : one for signature and one for encryption. Here they are :



The middle part is refered as PS in the standard. 

There is only one thing bothering me : why does PS differ between signature and encryption ? I can't see any reason ti fixe PS to a '0xFF' string for both padding.
Maarten Bodewes answer is correct, but it is missing one important point.

It is actually NOT secure to have randomness in PKCS#1V1.5 padded signatures, otherwise signatures could be forged via bleichenbacher's e=3 attack.

Take a look at https://blog.filippo.io/bleichenbacher-06-signature-forgery-in-python-rsa/ to see what happens when signature verification implementations forget to assert that those bytes are actually 0xFF.