In the middle ages, switching careers happened. The monastery was an option, and those with resources gave generously as an act of piety. Sometimes motivating factors were an act of penance or circumstances beyond their control like a civil war. Consider the case of Ludwig III, the last count of Arnstein in Germany.
Lothair III of Supplinburg was the Holy Roman Emperor from 1133 until his death in 1137. He had been King of Germany and King of the Romans from 1125 to 1137.
Civil instability followed the transition of power not due to a lack of viable candidates as successors to the throne, but due to the determination to eliminate all competitive threats to the throne.
In 1138 Henry the Proud, the duke of Bavaria (1126–1138) and of Saxony (1137–1138) was a candidate for King of the Romans. Conrad III, however, defeated him in the election by nobles and ecclesiastics with the papal legate Theodwin as witness. Conrad III then seized the territories held by Henry the Proud and gave the Duchy of Saxony to Albert the Bear and Bavaria to Leopold IV of Austria
Civil war broke out and Conrad III was never crowned by the pope as emperor.
In 1139, no doubt amidst the civil turmoil, Ludwig III von Arnstein transformed his castle on the Lahn River into the Arnstein Abbey. He then joined the order. The circumstances that led to that more than likely was the civil war following the election of the new king.
In 1146, Bernard of Clairvaux preached the Second Crusade at Speyer. Conrad III heard the call and went on the Second Crusade. The Seljuk Turks, however, defeated him in the second Battle of Dorylaeum in 1147.
In 1172 a monk named Lunandus participated in creating the Arnstein Bible, which is now in two volumes in the British Library. See Harley MS 2798 and Harley MS 2799. This two volume great bible is one of the superb lasting legacies from the period.