It's a nice idiom, sounds very poetic, like the beginning of some cowboy's reflections.
"It came as it had to come. The rains were strong in those days, and the new rivers hoed the bare earth better than any farmer, and carried many a careful plot with them. It was life and ruin all the same time."
Before "als", you have an obligatory comma (because "als" is a conjunction), but not before "wie", cf. the examples at https://de.wiktionary.org/wiki/wie#Vergleichspartikel (because "wie" is a comparative particulate)
If I understand correctly, "es kam" is the main clause of the sentence, so the verb is in the second position. "Wie" makes the second clause into a subordinate clause, and subordinate clauses have the verb be last. If that sentence had not been a subordinate clause, it would have been "es musste kommen", but the fact that it's a subordinate clause pushes the main verb (musste) to the end of the clause. While these clauses can be annoying when you're learning, they allow you to change the word order a lot more, since this sentence could also be "wie es kommen musste, kam es" while being clearly different from "es musste kommen wie es kam". I hope this clarifies things instead of making it more complicated.
This was a jawbreaker for me the first time I hit it. But I put it on a sticky on my desktop - as I usually do with sentences I find difficult - and let it sit there. Read it sometimes. Repeated it sometimes. Now I can rattle it right off, and thus confuse my friends and baffle my enemies. ;-)
Hmm, maybe it's just a slight variation in dialect, because I would not say "It came as it had to come" or "it looks as it will rain" but I might say "it came as if it had to come" and "it looks as if it will rain." I would normally use "like" instead of "as if" but never just "as".
I completely agree with your "rain" sentence--I would say "as if" or "like" there, too. Now that I think about it, your "as if it had to come" sentence does make sense, but I'd say it means something slightly different from the German sentence.
The German sentence ("as") implies that "it" was predicted or forced to come, and "it" came according to that prediction, "as/because it had to." It's the same sense as "He tripped and fell, as I told him he would." (I told him he would fall, and indeed he did.)
Your version ("as if") means that "it"'s coming implies that "it" was forced to come. It's the same sense as, e.g., "He looked scared, as if he'd seen a ghost." (Looking scared implies that he saw a ghost.) You would use "als ob" to translate this to German: "Es kam, als ob es kommen musste."
I love that they include idiomatic expressions; however, they should use the equivalent in English. Just saying "It came as it had to come" will not help the learner to know that it's like "It's bound to happen" or vice versa if the goal is to help someone know what to use in a given situation. Es kam wie es kommen musste Translation: It's bound to happen (lit. It came as it had to come)
I agree, the usage is rare, but now you can buy a product that promises: "Sexy, Mussed Up Hair From The Drugstore". (See: http://www.xojane.com/beauty/bedhead-in-a-bottle-sexy-mussed-up-hair-from-the-drugstore)! : )