BCG is used for two purposes. It use to ramp up the immune system in some cancer therapies. It does confer some level of immunity to TB. That is a double edged sword, and depending upon what part of the world you are in, determines which side of the sword you want to be on.
In the USA, the emphasis is on detection, since TB is a relatively unusual infection. If you immunize, people who are immunized have TB antibodies, and that makes it very hard to tell the difference between someone with an infection and someone who is immunized. Hence immunization makes it more difficult to track infections, and is unattractive from a public health view.
There is a way around the trap, but it hadn't been invented yet when BCG came into view.
In countries where TB is a major public health problem, the advantage of widespread immunity outweighs the advantage of detection. Hence immunization is attractive. The immunization actually quite common in parts of South Asia, and many 3rd world countries.
The way around the trap is to use a genetically engineered immunization, as has now been done with both Hep A and Hep B. The immunization produces an antibody to one of the Hep surface antigens (There are several). The serum tests for active infections test for a different surface antigen. I.E. if you have been immunized for Hep B, you will not test positive for Hep B antibodies, because they are careful not to test for the antibody produced by the vaccine.
If you are working from weakened strain, or a dead organism vaccine, you get antibodies for all of the surface antigens.