RFC 5652 Cryptographic Message Syntax (CMS), Section 14, page 54 states:
Implementations must randomly generate content-encryption keys, message-authentication keys, initialization vectors (IVs), and padding.
Thus, BouncyCastle implementation follows CMS standard.