Major failures are a little hard to hide probably. Advanced adversaries can see it probably, so better to control the story and report on it, rather than let the Chinese or the Russians reports on "US hypersonic missile fails, again!".
Another reason is to highlight the need for more funding. "We obviously need more money to run even more tests".
"Hey world! Look what we're building - we're not afraid of you or our failures!"
It's a very strong message. It's also propaganda, to control the narrative, distract and deceive.
Maybe they already know it's a dead end, or this is a test bed for something else. The cancelled rail-gun seemed like a giant materials science project, but maybe the Navy got _exactly_ what they needed.
Could it be that they aren't afraid _because_ they have superior weapons, and want to keep that edge? The world still appears to be a scary place when others may assume that you can't defend yourself.
According to the article this was published by the Defense Department, not the contractor. Sure, they also don't look good, but they have to justify their spending (to a degree). This is more or less a heads-up that the program will be delayed and cost more.
When something you don't want to get leaked is about to reach the public you are better of telling your side of the story to form public opinion before anyone else.
If you commit a crime and tell the whole neighborhood that someone else did it, they are less likely to suspect you.
E.g. Putin calls Ukrainians neo Nazis even though he is acting like a Nazi.
Another reason is to highlight the need for more funding. "We obviously need more money to run even more tests".