Is not that he is into bad guys, the issue is bigger than that. It can be related to the way your parents' relationship is and it may be by the way they raise you whit out teaching you how to feel loved and confident. He just doesn't know how to care for himself and he doesn't understand that someone who supposedly loves him would hurt him on purpose, maybe because that's the way their parents were. It takes a lot of inner reflection and also therapy to acknowledge that you are an adult now and you have the right to set boundaries and decide not to let anyone hurt you anymore. You are your best friend, treat you gently and lovely and be sure that your life is only yours to live.