That’s not entirely accurate.
Adaptive genetic trade-off works that way, but not mutated.
Mutations work by countless (figuratively) variables; not environmentally retained.
What permits the continuance of the mutation is:
A) the animal survives to breed
B) the gene does not recede through breeding; especially if it dominates other potentials
If those exist, then a practical application of the end result of the genetic mutation may occur if applicable.
Meaning, if the first “giraffe” lives and breeds, then if there are trees around with which it can reach that other animals in its pool cannot, then it will retain an advantage useful.
As such, it will be more likely to survive.
As such, more likely to pass that dominant gene onward (providing it is dominant).
There is no known environmental provocation for the MYH16 gene mutation outside of a hypothesis that notes that it occurred in time around the same time as inter-hominid breeding; which may have produced the mutation.
The end result was a hominid that could not fight and dominate in the same fashion as its surrounding hominids (biting), nor eat the same diet strictly as the other hominids in the same fashion (using teeth and biting to tear and shred through).
Just as simply as the currently known three generation family that has a high number of its family members with mutations to the FoxP2 gene (which is responsible for neurologically controlling the muscle articulation for functional speech) and thereby have radical impairments to speech (you can barely grasp what they are attempting to speak though they have no mental deficiencies and are “normal” in every other respect) are not having this mutation due to the gene determining a demand that it is attempting to supply progressively.
This mutation wasn’t generated by a demand of anything.
And hopefully, it won’t convey as a dominant gene which spreads beyond their family (it’s unlikely to, but hey…never know).
The viewpoint you are speaking of is the most common vantage by which arguments against evolution are based on, and is a misrepresentation of how gene mutation passing is attributed in evolution.
The genes don’t “know” what needs to come about next to gain an advantage.
In the same way that, again, the fly isn’t a pest to humans so that humans can learn patience.
The genes survive if the whole survives and the gene is a dominant gene (and commonly found in two pair - meaning both parents had the gene).
Oh, and regarding Neanderthals:
From what science has been able to determine (through genetics tracing) the Neanderthal separation from our common ancestor was somewhere in the ballpark of 300,000 to 400,000 (some debate other ranges as well) years ago.
The MYH16 gene is factored into occurring to the ballpark of 2.5 to 5 million years ago (I favor the 2.5/3 million year range due to the skull differences and time-lines between A. afarensis and H. erectus: but that’s just my opinion and not something I can stand firmly behind with any evidences).
The Neanderthals did not have a double concaved skull.
Their skull was similar to ours in regards to roundness.
Neanderthals are quite simply (yet loosely speaking) giant variants of homo sapiens sapiens.
We are not yet entirely certain what happened that caused their extinction (as is true with all of our relatives akin to being runner-up’s for the single surviving human species [we could have easily had 5 or more species kicking it around on this planet side-by-side with us right now btw; we’re still trying to determine why these other entirely separate cousins died out completely])