Germany having no clue their ciphers were practically useless during the First World War was genius on behalf of British Intelligence. Britain, haven broken their cipher and not allowing Germany to know had turned out well for the Allies because it discouraged Germany from creating a new cipher. In my opinion, it made sense for  Winston Churchill and the British Royal Navy to release their histories of the war and specifically their knowledge of German encryption when they did. Doing so gave the British a lot of clout within the world of crypt-analysis and national intelligence as well as it gave the men who worked in Room 40 the recognition they deserved. Also, it would be pretty naive to think that if another war were to come about that Germany would use the same codes and encryption techniques they used previously. Even if the British had kept it a secret, Germany increased their military technology so much during WWII that it would not be a far stretch to believe they would incorporate something similar to the Enigma at some point. I think what mostly came out of Britain revealing they had broken Germany’s cipher in the way they did was to make Germany look like a disorganized and careless nation, practically saying, “We beat Germany because they were oblivious to their intelligence and because they were blinded by their own pride.”