That's news to me that French for "valley" is masculine and "val" - isn't it feminine "vallée"? Like, say "Vallée Blanche" near Chamonix? And I suppose the English ripoff, "valley" sounds more like "vallée" than "val" (backwards argument, I know).
By the way "Le dormeur du val" (The sleeper of the small valley) is one of Rimbaud's most famous poems, often learned at school.
The "Trésor de la langue française informatisé" (which hasn't been updated since 1994) says val is deprecated, but it's common in classic literary novels, together with un vallon, a near synonym.
-- https://fr.wikipedia.org/wiki/Vall%C3%A9e I agree. it's weird. I'm sure there are other similar examples
Apparently val gave vale in English.
Of course, it is not always the opposite, otherwise it wouldn't be random. A penis (un penis) is masculine for instance.