As discussed in the book, initially, the British were quiet and low-key when it came to the fact that they could decode Germany's messages during the first world war. But then, Winston Churchill and the British Royal Navy decided to let it be known that they knew how to break the codes all along. Upon learning that their codes could be broken, the Germans began to invest their smarts into the Enigma machine technology. So should the British just have stayed quiet about their decoding abilities? Personally, I say no.
By letting Germany know that they could decode their messages after the fact, I believe it could have made the British feel as if they established some type of superiority over Germany. Such as a taller person dangling an item over the head of a shorter person, knowing that the shorter individual cannot reach it. It's like a "Na-na-na-boo-boo," moment for the British. They were so proud of their achievement, of course they were not going to stay quiet about it for too long.
And even then, it is not as simple as to say that they were just proud. They knew that it would give Germany this kind of doomed feeling even though everything was revealed after the fact. Germany must have been so secure with themselves, so secure with their encrypting strategy only for them to find out that their messages could be decoding the entire time. It is like a punch in the gut, believing something of yours was great all along only to be proven that it is not really all that good. Maybe I am reading too deep into this, but I believe there could have been some type of psychological aspect to this, and if this was done just to play mind games with Germany, it was smart.
But then it led to the creating of the Enigma machine, which was maybe not particularly great, but great mind tricks, Britain.