Cis/trans Proline vs. Double bond character
The change from cis to trans (called isomerization) is not spontaneous. There are proteins called prolyl isomerases (see Wikipedia Prolyl Isomerase) that assist in the isomerization process. This happens when the protein is being folded into its final secondary and tertiary structures.