The pyknotic change in the nucleus is primarily caused by the process of chromatin condensation. This can occur due to several reasons, including cellular stress, DNA damage, or activation of specific pathways leading to programmed cell death. During apoptosis, endonucleases cleave the DNA into fragments, initiating the condensation process.