Emergence of the persistent spin helix in semiconductor quantum wells