The first one is a relative clause, which describes a noun. A "when" clause usually describes the time of the noun:
a day when everything went wrong.
There are many days, but they are all at different times. So we can identify a particular day with a "when" clause
We can also use it for something that changes with time:
Her face when she saw her boyfriend
This identifies her face at a particular time.
A when clause can also identify a particular context or situation. This is your case.
a problem when children have a job.
It identifies which type of problem we are discussing by giving the context
The second question is different. There is a parallel construction
They work full time. (but)
Due to their age, they are not protected by law.
The "They" in the second sentence has been omitted to avoid repetition. As you see, this adverbial contruction is before the (omitted) subject.