Generally speaking, heterochromatin or euchromatin structures mark specific regions to regulate the transcriptional activity and these marks carry the signature of developmental processes as they differ in different tissues (or cell types).
Therefore, we should not ignore the developmental processes if we want to understand how such epigenetic marks are formed. But first, we should reconsider the question as it assumes that the heterochromatin is produced. The assumption is somewhat valid, there are many enzymes responsible to shut the chromosome off thru the histone modifications. On the other hand, heterochromatin strucure comes as a default (or as the factory settings). Before the mid-blastula transition, where no (or negligable) transcription happens, all the genome is heterochromatin due to the excess amount of histones. After certain amount of division, the amount of histone per cell reduces but the genome per cell remains constant which then titrates the histones and some transcriptional activity kicks in.
Then HATs, methyl transferases etc. help to clear up the necessary genomic regions depending on the extracellular developmental signaling. Then for many somatic cells, the ratio of heterochromatin and euchromatin regions more or less remain similar.