In some people,TB bacteria can remain inactive their whole lives

Yes, that is correct. In some cases, individuals can carry tuberculosis (TB) bacteria in their bodies without showing any symptoms or signs of active disease. This is called latent tuberculosis infection (LTBI). During this latent stage, the bacteria are present but are not actively growing and causing illness. People with LTBI are not contagious and cannot spread the infection to others. However, if their immune system becomes weakened, the bacteria can become active and lead to the development of active tuberculosis. It is important for individuals with LTBI to undergo preventative treatment to reduce the risk of the infection progressing to active disease.