Just yesterday I had my boss say roughly "don't tell anyone I told you this, but ..." and proceeded to explain what's going on "upstairs".
If you're not willing to take a risk and trust them then you're not trustworthy and whinging on a forum about how unfair people are for not understanding your reasons for lying to them means you didn't learn anything from the exercise.
If I ask a question and my boss tells me "I can't talk about that because X, Y, or Z", I'm fine with it. We're all adults here, we all understand there can't be complete transparency. But you lied to them by omission about things that can affect their employment status. They don't trust you because you're not trustworthy.