Complex sentence: Shiva's function is to destroy, if he get a child exactly like Lord Shiva then the child will cause whole yadu dynasty to destroy this is why he prayed to have a son like Shiva.
Split into simpler sentences: Shiva's function is to destroy, if he get a child exactly like Lord Shiva then the child will cause whole yadu dynasty to destroy. That is why he prayed to have a son like Shiva.