Good that you notice yourself developing bad habits because you are and always will be as long as you mainly fight against computers. The main problem with them is that they will always do the same thing as in they only move towards you, always attack at certain ranges, etc.
You can use them as training if you know how to put their actions into context, knowing that they do limited things and see it as a situational training (e.g. PPMD mentioned baiting out attacks while dash-dancing close to them). But it requires quite some understanding and skill to do that very effectively which is why you should stick to raw techskill.
Since melee is a competetive game, there are two or more players on stage, meaning that the game is about the interaction of two players. At home you can do your best to understand the "single-person" sides of the game, that don't require a live opponent like practicing combos on the
20XX hack pack. You can look at how the engine works through
Kadano's Melee Mechanics series or look at frame data, see how shield pressure works, etc.
However you will need someone else to understand what having two players really means, how both players want to gain advantages, how you need to bait your opponent with that in mind, how ambiguity is important in everything you do and how reaction time plays a role in that.
These are things that you cannot learn, they need to be explored practically - with a partner - and there's no way around it.