Today we (me) tend to think of the lives of monks and nuns as a one way street: you join the church and you never leave.
In the series, which are based on a book with a similar name, set in mid-late 12th century Sweden, Arn is first sent to live in a monastery as a child to fulfill a vow made by his mother. Algot has two daughters, one of which also lives in a nunnary, but Algot sends the younger child to replace the elder. Arn leaves the monastery as an adult, only to to have him and Cecilia sent back as punishment for having a child outside of wedlock. They are sent for 20 years, after which they are allowed to leave the church again.
Is this in-and-out church life something that happened in 12th century Scandinavia, or is it just a fictional device invented by the author?
tl;dr: It would be certainly irregular in 12th century Scandinavia or elsewhere in contemporary Europe in reality (Arn is a historical fiction), but not really impossible.
Sorry for late response.
Before considering the topic, it would be a bit useful to summarize some premises narrated in the novel:
+++
In 1450, a officer of the Apostolic Penitentiary in Rome dealt with a parent-child quarrel on the monastic vow of the child from Monastery Varnhem in Sweden where Arn Magnussson allegedly grew up in nearly 3 centuries ago: The boy Nanne Kärling (ca. 15 years old) changed his eariler mind and now did not want to make a bow to be a monk in spite of their parents' wish (with the alms to the monastery). His elder brother also seemed to ally with Nanne who wished either to return to a secular life or to transfer to another monastery of the same monastic order. Even the archbishop of Uppsala, the highest ecclesiastical authority in the entire church province, heard this case and inquired to this special offices in Rome specialized as a court of the minor (?) breach of Canon Law regulations. The official made a decision that the boy Nanne could be free from the monastic obligation as long as he had not made a vow (Risberg & Salonen 2008, no. 22ab).
In the 15th and 16th centuries (i.e. before the Reformation in Sweden), we have 44 petitions in total by monastic and ex-monastic persons from the church province (archbishopric) of Uppsala, Sweden (Risberg & Salonen 2008: 117). While the direct request to return to a layman, such as the case of Nanne the boy above, was few (2/44), it is worth nothing that nearly one-forth of the total petitions (10/44) were made by the ex-monks who asked for ex post facto approval and dispensation to their 'apostasy', i.e. the leave from the monastery. In short, the petitioner no longer stayed in their original monastery when they inquired a dispensation to the penitentiary office in Rome.. Taking the estimated 'monastic' population in late medieval Sweden into consideration, these figures might sound relatively small, but there were certainly some monks who changed his mind and wished to return to their former secular life, or at least to change their surrounding to another monastery.
This kind of problem, i.e. 'vagrant' monks out of their confined monastery, seemed not to be unique to the northernmost church provinces of Scandinavia, rather common to Latin Christendom. To give an example, Jaritz counts 29 similar inquiries respectively from the archbishoprics of Passau and Salzburg in the 15th century (Jaritz 2007: 88, for 1431-47 and 1471-84).
Now it is time to shift our attention from the Papal archive in Rome where some statistic data available to the peripheral landscape of Sweden.
+++
The case of Nanne in fact shows another aspect of OP's question, also related to our Arn: How popular was the child entered and grew up in the monastery in Sweden, and also was he expected to be a monk?
In spite of de facto prevalence well into Later Middle Ages, as shows above by the case of Nanne, the practice of child oblation, that is to say, to received children of the nobles together with some alms based on their parent's wish, had primarily been an inheritance of the Early Middle Ages, the golden age of the Benedictine monasticism (Southern 1970: 223-30). It actually got criticism from the 12th century reformed monastic orders, including the Cistercians, whose general chapter in 1134 also decreed that 'the boy younger than 16 years old was neither to be educated in the monastery nor to be received as a novice' (Andersson 2014: 154). Thus, this practice of child oblation certainly lost their popularity roughly by the time when the foundation of monasteries, especially of new, reformed orders like the Cistercians, got trend in Sweden (i.e. the 1140s).
If you are interested either in the historical-setting mystery novel or in medieval monasticism, I'd recommend also to check the classic Brother Cadfael Chronicles (1977-94) by Edith Pargeter aka Ellis Peters. The story of this series is set in Anglo-Norman England during the Anarchy period (ca. 1135-54), roughly a generation earlier than Arn series and especially in the monastery in Shrewsbury, where they also passingly discussed whether they should also keep this practice of oblation further in one of the series (volume 4 or volume 5, if I remember correctly).
Thus, as for Sweden, Andersson makes a conclusion that: 'Based on these grounds it is difficult to draw any other conclusion than that child oblation was not very common in male Cistercian houses in medieval Sweden' (Andersson 2014: 157).
She also makes an interesting remarks on the young boy entrees into the Cistercian houses based on the charter evidences, however, though all the cases dated to the 14th and 15th centuries (thus more than 2 centuries later than the alleged lifetime of Arn): While 2 possibly oblate cases from the 14th century explicitly mentioned the boy's own wish, as Nanne had initially agreed to be a monk, a early 15th century charter from Cloister Nydala (in Östergötland) record an agreement between the abbot and the parent that the former should 'give knowledge of the books and help him to school until he grows to manhood', in exchange for the donation of a mill, meadows and field (SDHK no. 16861, Andersson 2014: 154). Andersson supposes that the boy in question was only received in the monastery for education for a limited period, and that he eventually lived a layman's life without making a monastic vow once he grow up to adulthood.
These evidences mentioned above suggest that Swedish Cistercians had at least less difficulty in receiving the young boy for a limited-period education rather than they didn't mind the infringement of the statutes of their order against the child oblation at all. If we interpret the alleged case of Arn in line with this hypothesis, the story line of the novel/ film fit well with the historical background of the 12th century Scandinavian monasticism in reality.
References:
+++