Apologies for late reply.
I think it depends on which habit is of concern.
Alcoholism - (same as cigarette smoking) starts off with just one, then soon becomes an addiction. I guess the same goes for substance abuse e.g. chroming as well as shooting up drugs. Homosexuality like any sexual act can become an addiction as can pornography or gambling.
IMO, all the above start as they meet some need within the individual whether that be emotional, psychological or social or some mix of all three. Then there is the influence from others - ads everywhere many years ago portraying cigarette smoking as macho and for the women seen as sexy, alluring, sophisticated etc. Peer influence too can be a factor on those who wish to fit in/ be liked/accepted/have friends to hang with instead of being an outsider/loner.
None of these are good enough reasons, imo, to negate the start of taking up these habits. Once ingrained they are certainly difficult to give up, some more difficult for some people than it is for other people. And the situation a person is in, one may or may not be able to be changed for various reasons perhaps not for some time until these other factors are resolved or changed e.g. groups of friends one hangs with.
But that doesn’t excuse the person from not trying to quit the habit, turn their life around, as we know that with God’s grace nothing is impossible. And it can be a few to many failures before one is successful in quitting the habit for good and the struggle to do so can be intense. But still a Catholic or Christian must not give up, but continue to beg for help from God and align his own efforts in co-operating with these graces to quit. It is possible, because people quit these behaviours all the time.
Science tries to explain things by finding a physical cause for everything and they discount God and His grace. Science tries to find a cure for everything (which is a good), but again they are discounting God’s Will.
I think the danger for some people is to say - science says the cause is XYZ, therefore it isn’t my fault, therefore I have not incurred any sin/guilt; therefore I do not have to change my ways, because I can’t as science says it is due to XYZ. So they think this then frees them from making any effort to change, to make sacrifices in giving up XYZ and its associated activities/friends etc.
Whilst science finds the physical cause of some behaviors, then there is still the will to engage in these behaviors. For some things there are drugs available to help reduce the cravings etc, and there is therapy and support groups - all to help the individual in their decision and efforts to give up the habit. But it still is up to the individual to give up the habit - no-one nor anything can take the place of the effort/wll of the individual in trying to change and then remain strong to not choose to go back to their old ways.
Science can explain things - physical & psychological, but a lot of these habits are started within the will, and it is up to the will to stop along with any aids to do so that is available.