That's the Mexican army, and I have no clue how they work, but in the US military, I think HIV positive individuals are not accepted for enlistment, or are discharged if the HIV is found after they are enlisted. At least for combat soldiers...not sure about those with civilian-type jobs. Soldiers need to be healthy, and HIV can be quite a chronic illness requiring a lot of medical intervention, not to mention the risk of exposure to other soldiers living in close proximity and in battle conditions.
My son almost joined the Navy last year (changed his mind at the very last second). He developed Type 1 diabetes this year. If he had been in the Navy when he got his diagnosis, he would probably have been medically discharged...and rightly so. He cannot live without insulin every single day of his life and he can't be in combat with the restrictions he has. It's hard enough to live with T1 diabetes in regular life, let alone the stressful conditions of being a sailor.