The White House Office of Protocol, I believe, has plans ready to go on day one of each administration.
JFK's services were fairly strongly influenced by the ceremonies for FDR, who had died only 18 years before, as well as the historical record of Lincoln.
Bobby and Jackie, I believe, also took quite active roles in planning the rites for JFK. They were both pretty well educated in history as well as intent on enhancing JFK's role in that history.
It's certainly amazing they were in any condition to influence things at all, especially Jackie.
But as you certainly know, sometimes an event of that nature kind of shocks you into clarity. To some extent you may be functioning on automatic control, but if you know something was important to your lost loved ones, you do what you have to do to get it done.