Maybe because his "decision" not to tell the others is flawed, but the author needed the plot to move forward in more ways than "let's spend another episode talking", so he had the MC speak with the magical girl.
Why do I still criticize it? Because if the MC does suffer from depression, he would have difficulty speaking of the matter, and not a complete and absolute blockage of the topic. We know that this is not true due to the scene with the magical girl, yet the scene with the crazy murderer makes a point yet again to show the MC being pained and having a panic attack.
The only thing that would make sense, then, would be for the MC to "drop" or say he found out who the Military Princess was but not tell them the full story due to his scars, since the webpage does not point towards him at all when they find it (a piece of information he obviously knows). So either this plot point of the story is flawed (due to tropes like Miscommunication Kills and Idiot Ball), or the MC cares so very little about the group and their lives that he would prefer to wager their lives as much as necessary to avoid the odd chance of someone figuring out he's got something to do with the topic.
It makes sense for the MC to be withdrawn and erratic, not to be completely blocked off, then suddenly spill the beans when one of the "enemies" just asks about the matter. The MC has been used to add tension and have the magical girl move towards the Imperial Princess, but the narrative doesn't hold the weight of those decisions.
PD: I recommend to put your last sentence in spoilers, for people who are not caught up