You are guessing that they are guessing, and don't in fact know that. Your opinion has the right to exist, but I'll choose to believe that they identified actual military intelligence officers using methods they're not going to tell us about, to send a strong message to China (whether these specific officers are guilty of these specific offences is immaterial, the outing itself is the message).
I am pretty sure this one is for domestic consumption.
The Chinese are a bogeyman comparable to the Russians. Being tough on them and have the other party being in bed with them is something that is surely useful in a coming election campaign.
As for the ability to trace back traffic sent through 30+ computers placed around the world including China; just think of what surveillance and logging that would entail. It is not really possible.
Other than potentially exposing sources and methods what do they gain exactly? They aren't going to Beijing to arrest them, and only legal indictments aren't(and haven't) going to scare off China.
The case will never go to court. The DOJ knows it so they don't have to have actual evidence.
The indicment is being publicised for political reasons.