Does department receive funding for each PhD candidate
This makes me wonder whether the department receives money for each PhD candidate to finance the department, so that the PhD candidates number and years spent there are of essence.

(Context: I'm familiar and have first-hand experience with the German system.) There is no direct flow of money for each PhD candidate. However, the number of graduated PhD students is seen as a performance metric for both departments and professors, and professors might receive a certain salary bonus for scoring well on that metric.
A rational reason for keeping around the candidates longer than necessary might be that she wants to squeeze more work out of them, including papers. There might also be other, non-rational reasons.

Is there anything to be done to get out of such situation?

Walk away. The advisor seems to have little to offer except for the dangling carrot of an eventual PhD degree; however, for a person that values their time as an asset that could be used for other things, that's probably not worth it.