[This gemara and its explanation are counter-intuitive and ostensibly counter to Rav Kook’s general approach.]
Gemara: [After being told he was to die on Shabbat, David said:] "Let me die on Sunday." Hashem replied: "The time for your son Shlomo’s kingdom has already arrived, and one kingdom may not touch another even in the slightest." "Let me die on Friday." Hashem replied: "‘For one day in your courtyards is better than a thousand’ (Tehillim 84:11) – I prefer one day that you sit and are involved in Torah to a thousand burnt sacrifices that Shlomo is destined to bring before Me on the altar."
Ein Ayah: Divine Providence deals with mankind’s progression, which is designed to bring the collective to the high level its Maker set for it. Therefore, factors that are to make major changes in the leadership are synchronized precisely. When a national leader begins his reign, his actions are noticeable, as they include major changes according to his new spirit. As he ages, matters follow the path he forged in his youth. This pattern of fast and slow steps and breaks is part of natural history. When Providence decrees the need for a new era to begin, with its many innovations, a delay of even one day is of inestimable consequence, for all the changes and their contributing factors are interconnected.
David did not want to die on Shabbat so that the ensuing sadness would not take away from the nation’s tranquility. He did not want his death to be fit for him as an individual, but appropriate for communal needs. However, his concern for the collective was as the collective related to him as an important individual. The nation’s more basic need was to follow its path, which included inaugurating the era of Shlomo Hamelech. The changes he was to make could not be delayed even slightly in deference to an individual’s needs, great as they might be.
David then reasoned that it was acceptable to end his era, which was at a point of slow progression, a day early. The communal progresses over time, despite some regression for the sake of subsequent progression, as Hashem created the world for it to advance. Therefore, starting a new period earlier can be fine. However, although the collective concern is more important than the individual one, as it pertains to many, still the collective’s standing depends on the individuals of which it consists. The advancement of the collective is supposed to advance the individuals, which is absolutely central in regard to the life and spiritual advancement of an especially lofty and important individual. In David’s case, he had already reached such a level of sanctity and holy spirit that he was an individual who was the foundation of the collective. His Torah study, while an act of private development, was more beloved to Hashem than actions that helped prepare other individuals to emulate him.
Sacrifices, especially in great volume, are designed primarily to impress the collective with the honor of Heaven. But Hashem said many times (see Tehillim 50:8, Yirmiya 7:22) that this is not His primary concern. Heightened morality and understanding of Hashem bring one to as high a spiritual level as sacrifices can. Certainly, service with sacrifices is critical for the community, when the nation assembles at the house of Hashem and performs service according to the Torah’s rules. This influences people to desire to follow the path of Hashem, and many individuals will be improved by things such as a thousand sacrifices that Shlomo offered. However, the Torah study of the already established holy person is the fruit itself that Hashem loves. That is why Hashem was not willing to pass up on David’s holy actions for a day even in order to hasten in the preparatory actions that would begin with his death.