That’s just what happened with the Volkswagen’s Iltis. From a publicity effort for its new civilian utility vehicle derived from a military spec model came the foundation for a dominant rally car.
Secrecy is an asset among the military. Except in Belgium apparently. The Belgian army has publicly released plans for its future HQ. They were visible online, to everyone, for 48 hours.