Basically, your itinerary was supposed to be:
City 1 (country A) — city 2 (country B) — city 3 (also country B) — city 4 (country C)
Notice that city 2 and city 3 are in the same country. Every country I know of has rather lenient laws about flying from one place inside that country to another. They assume that this type of flight will be heavily used by locals of city 2 or city 3 for domestic travel. The procedure to get on one is basically check in, go through security screening so you don’t carry goods not allowed on planes, go to the gate, confirm you’re still the same person (e.g. boarding pass), fly. When you arrive on the other side, all you have to do is exit the plane and then the airport — no customs, no immigration because you are still in the same country.
International flights, like the first and third leg of your journey, are typically an entirely different story. There will typically be an immigration check when entering the other country. Again, every country I know of wants to know who enters and reserves the right to refuse certain parties at their border. Part of what defines a sovereign nation: the ability to control who crosses your borders.
Since this is a major difference, international flights and domestic flights are often physically separated within an airport. You will be at different gates, sometimes different terminals altogether. There will typically be no mixing of international and domestic departing travellers airside — which also includes international and domestic transferring passengers, as you would be one.
Applying all of this to your itinerary, every country I know of will want you to pass through immigration at city 2, because you are now entering country B. You will transfer into a domestic part of the airport before you board your second flight. When your second flight arrives in city 3, you could just ignore the final leg of your journey and stay in country B. This is especially true if you’re only carrying hand luggage.
Hence, to be allowed to board the flight to city 3, you need to formally enter country B — have the required prerequesites (visa), and be allowed to enter by the immigration officer on duty at city 2. They will check it and stamp you in. Over at city 3, you will again have to formally exit country B before being boarding your third flight. Thus, you need to be legally allowed to enter country B.
It is the airline’s duty and responsibility to check on check-in that you are actually allowed to enter all the countries you are entering during your itinerary — they do this by confirming that your passport’s validity fits the required criteria and that any required visa are present. Sometimes this also includes required transit visa, even if you remain airside and never formally enter a country you’re transferring through. If the airline fails to perform reasonable checks and you are denied entry into a country, they must transport you back to where you came from and they may be liable to pay a fine. They want to avoid that. Hence they do perform these checks and err on the side of caution.
In your case, your domestic leg is in Germany. You must either have a passport that allows you visa-free visits to Germany or you must have a visa for entering Germany. A transit visa is not enough! If you are a holder of multiple passports, then only one of those must allow you to enter Germany, since immigration never asks for all passports a person owns (only ever one). I assume (but we do not know until you enter your citizenship into the question) that you are not a national of a country whose residents are allowed to enter Germany visa-free (since you got refused by the airline which should never happen on a ‘good’ passport). And I also assume that you do not hold a corresponding visa — same argument.
A US Green Card is not a passport. It is not an official document of citizenship and thus it cannot be used to determine whether you are allowed to enter Germany or not. Your holding a Green Card is completely irrelevant for all legs of your flight save the final one.
: The most prominent (but not the only) exception to this distinction between international and domestic is the Schengen area. For the intents and purposes of this answer, the Schengen area can be considered a single macrocountry, although that it not the entirely correct picture. However, there are no passport controls on intra-Schengen flights, and they typically depart from the same areas of airports as domestic ones do, often using the exact same gates.
: Note that it is very possible for international and domestic arriving (not transferring) passengers to mix after the former went through immigration control. This allows for a single set of luggage reclaim area and hence an easier airport building layout.
: Formal meaning to go through an official process not to technically go through a process while not actually doing it.
: As hinted above, Germany is part of the Schengen area. Hence, a visa ‘for Germany’ will always be the corresponding Schengen visa. And indeed, the idea would have been the same if you had chosen a route Kiev–Munich–Paris–USA. Kiev–Munich–London–USA would probably have worked (as according to phoog’s answer, a Green Card exempts you from the requirement of acquiring a Schengen transit visa. You still need to make sure you can transit London though — and again, it can only work if it’s only one London airport).