The Enterprise was nearly destroyed by the Genesis device on the Reliant. It barely escaped by going to warp speed at the last second.
When the device detonates, the wave is strong enough to encompass a nearby world. David and Carol Marcus would have (should have but did not?) warned Kirk that the planet was unstable and would destroy itself within days. (As it did in the next movie.)
The Enterprise returns to Planet Genesis shortly after the explosion to place Spock's casket there after the funeral.
Why did Admiral Kirk return to Planet Genesis so soon?
Would he not have worried that the Genesis Wave is still active? Would he not think that the Genesis world could have destroyed itself sooner because the device was activated in a non-controlled experiment?
Even if the planet was stable and there were no further dangers, he had other reasons to leave soon.
- The Enterprise was badly damaged and needed to return to a base for repairs.
- Many of the crew needed further medical attention.
- To return Spock's body to his family.
- He had to inform Starfleet of a breach of security.