People always state this like it's some dirty secret, but it's an ongoing calculation for any given pharmaceutical company. If they think a cure is within reach, then they try to go for it, because if they focus purely on treatment and a competitor discovers an easily findable cure, then they make no money on the treatment.
If, however, after a lot of work, a cure seems elusive, it makes sense to focus on treatment. Both for the sinister reason that people pay more over a lifetime for treatments, but also for the less sinister reason that it's usually much easier to develop treatments than cures, and having a treatment and not having a cure is strictly better than not having a treatment and also not having a cure.