Some women, upon first learning they're pregnant, will immediately conjure up names for the baby; others will wait until they're further along, at least past the vomiting and desperate need for sleep; others will hold off until the baby is actually born. I've heard mothers in this last category say, "I needed to meet my baby before I could name her."
For me, dedicating a book is like all the above. Looking back, I can see how every book I've gotten published has fallen into one of these three categories.
It was clear from the beginning that my first book about working productively from a home office would be dedicated to my parents who both "made me constitutionally incapable of working in anyone else's office." It was equally obvious that my book about Twelve Step recovery would be dedicated to "those who have the guts and grace to do the work of recovery."
After those first books, I'd need to get pretty far into the writing process, at least past the vomiting and desperate need for sleep before I knew whose book it was, but at some point I'd be able to name that person without equivocation. Sometimes that point in time was long after the manuscript had been sent to the copy editor.
All other guardian angels get mentioned by name in my book's acknowledgments. That cloud of witnesses seems to change from book-to-book, as do I, which I believe is part of the Almighty's grand plan for my corporeal existence.