The Lorting are a very strange race. Not only are there multiple genders (the actual term for which is more like 'castes' or 'classes'), but when any member of their species is 'born' it is born at it's full size with exactly the same configuration and number of cells as its peers (similar to Tardigrades). All Lorting have incredibly similar genetic code, much closer than humans.
Some of the castes are capable of 'giving birth', and any other caste (including other breeding castes) can induce a pregnancy with the potential outcome in gender being determined by the combination of parents (in the same manner as some bacteria). Asexual or homosexual reproduction is not possible.
The castes of the Lorting capable of birthing may be smaller than the largest caste they need to give birth to, so rather than internal gestation or laying eggs they instead create a biological substrate onto which they 'print' (though it's actually far more complex than that) the child. This substrate is attached to a solid surface and can maintain the child for short periods while the parent feeds. Not only that but multiple Lorting can (if they've recently 'given birth' to the right caste) work on the same child as the substrate maintains their genetic integrity.
The question is what set of circumstances could possibly give such a species an evolutionary advantage leading to the selection of such strange and complex behaviour?