Employers are required to reasonably accommodate people based on disabilities and medical conditions. What is reasonable is up to debate. It would also require that you can show they fired you for that issue, which can be tricky because they can always find some legitimate reason to cover their true motives.
One example of this could be an alcoholic. Maybe they showed up to work drunk. If they tell their employer that they are an alcoholic, the employer has to offer to get them help before they can fire them. If they refuse help or the issues continue, then you're allowed to fire them. Now if they never told the employer about their condition, the employer could just fire them because maybe it was just a bad decision to stay out partying all night, which is not a medical condition.
It appears the OP may have waited until the termination meeting with HR to communicate the medical condition. It's not clear that the OP actually requested any accommodations or leave. In fact, it's not clear that the company denied the OP anything or had any way of knowing the OP's situation leading up to the firing event, due to the OP's admitted lack of communication with the company.
True, you don't need to say what the condition is.
Uhm... most of the US is at-will employment, which means they can and do terminate people at any point in time with absolutely no reason necessary what so ever.
There is 0 protection for employees in the US (in most cases).
This is not like Europe at all where there are rules around how you can fire people and legal requirements that need to be met.