Different legal traditions
There is the obvious distinction that one decision was under German law and the other under English law. England is a Common Law country, Germany is is a Civil Law country.
Civil Law
Civil law, civilian law, or Roman law is a legal system originating in Europe, intellectualized within the framework of late Roman law, and whose most prevalent feature is that its core principles are codified into a referable system which serves as the primary source of law. This can be contrasted with common law systems whose intellectual framework comes from judge-made decisional law which gives precedential authority to prior court decisions on the principle that it is unfair to treat similar facts differently on different occasions.
Conceptually, civil law proceeds from abstractions, formulates general principles, and distinguishes substantive rules from procedural rules. It holds case law to be secondary and subordinate to statutory law.
In principle, in a civil law country there exists a definitive code of laws that can be examined to determine the legal consequences of any given action.
I don't know enough German law to know what the probable outcome of Charlie's case would be if brought under German law.
Common Law
Common law countries are not so straightforward:
In cases where the parties disagree on what the law is, a common law court looks to past precedential decisions of relevant courts, and synthesizes the principles of those past cases as applicable to the current facts. If a similar dispute has been resolved in the past, the court is usually bound to follow the reasoning used in the prior decision (a principle known as stare decisis). If, however, the court finds that the current dispute is fundamentally distinct from all previous cases (called a "matter of first impression"), and legislative statutes are either silent or ambiguous on the question, judges have the authority and duty to resolve the issue (one party or the other has to win, and on disagreements of law, judges make that decision).5 The court states an opinion that gives reasons for the decision, and those reasons agglomerate with past decisions as precedent to bind future judges and litigants. Common law, as the body of law made by judges,7 stands in contrast to and on equal footing with statutes which are adopted through the legislative process, and regulations which are promulgated by the executive branch.
In a common law country it is not enough to look at the laws and regulations that have been promulgated; you must also look at the cases that have been decided about them.
Equity Law
To further complicate things, England had 2 parallel court systems until the 1870s when the courts were fused but the legal traditions weren't! To this day in England there are two quasi-independent stands of law: common law (not to be confused with the same phrase when used to apply to the whole system) which was administered by the central royal courts and equity which was administered by the Court of Chancery. To bring an action at common law a plaintiff needed a Form of Action, a very narrow and restrictive reason to bring a case. Because of this, the common law could sometimes lead to unjust outcomes where a potential plaintiff had clearly been wronged but had no legal redress: equity law filled this gap.
Injunctions
One of the remedies available under equity is an injunction: a court order requiring (or prohibiting) something to be done (or not be done) by someone. These are issued when a plaintiff would be harmed by the defendant's (in)action and monetary damages would not be adequate compensation. These can also be issued in anticipation of unlawful conduct by the defendant i.e. to prevent that harm occurring in the first place - this type of injunction is common in (domestic) violence cases to such an extent that their use has been legislated (codified).
Why is the court involved?
The judgement itself addresses this at paragraph 36:
Some people might ask why the court becomes involved at all, why should the parents not be the ones to decide? A child’s parents having parental responsibility have the power to give consent for their child to undergo treatment, but overriding control is vested in the court exercising its independent and objective judgment in the child’s best interests. This principle has been enunciated in many cases over the years, including by Ward LJ in Re A (Children) (Conjoined Twins: Surgical Separation) [2001] 2 WLR at p.480.
In the Charlie Gard case, his parents had proposed a course of action that the hospital believed was not in the best interests of Charlie. The hospital is entitled to petition the court for an injunction prohibiting Charlie's parents perusing their proposed course of action and allowing them to withdraw life support. There is precedent that a hospital has standing to bring the case.
While the case was being heard it would be normal procedure for an interim injunction to be issued maintaining the status quo. This is referred to in paragraph 31:
I also made an order on that date that the applicants should generally furnish such treatment and nursing care as may be appropriate to ensure that Charlie suffers the least distress and retains the greatest dignity consistent, insofar as possible, with maintaining life until the final hearing.
Breaching a court order is a serious crime.
Judgement
Please take the time to read the judgement of first instance by MR. JUSTICE FRANCIS. The orders he gave are:
(1) That Charlie, by reason of his minority, lacks capacity to make decisions regarding his medical treatment;
(2) that it is lawful, and in Charlie’s best interests, for artificial ventilation to be withdrawn;
(3) that it is lawful, and in Charlie’s best interests, for his treating clinicians to provide him with palliative care only; and
(4) that it is lawful, and in Charlie’s best interests, not to undergo nucleoside therapy provided always that the measures and treatments adopted are the most compatible with maintaining Charlie’s dignity.
While not explicitly named, this is an injunction.