If they need assurance for themselves that they are straight, then you are right, they are likely not. However much of the most extreme gender and sexual expression (primarily masculinity and heterosexuality, but not exclusively) is cultural and performative, and certain groups expect you to uphold that performance at all times, and reject anything that would be counter to it.
That is the idea behind toxic masculinity, for example. It isn't that masculinity is bad. It is the that the cultural expectations and barriers and hyper-fixation on masculinity are bad.
The same applies to sexual orientation sometimes. There can be cultural expectation and conformity that comes with your declared orientation, and failing to conform can have consequences in some groups. So it's not necessarily about appearing straight to hide your secret gayness, but may in fact be about appearing straight becuase doing anything outside of those expectations may have social consequences. For example, a heterosexual man giving another man a friendly hug or platonically holding his hand can cause people to question his role in their social circle. It doesn't have to be about his actual orientation at all.
FTFY