Technical reason that specialized embryonic cells form
There is indeed chemical signaling that triggers the differenciation. There are gradients of chemical species during the development. Look at https://en.wikipedia.org/wiki/Morphogen ! There are also other references there. 

PS: there is a stack exchange question from today about something related Can gap genes delay their expression?