There are at least two ways in which this is possible.
One has to do with the “structural strain” theory of deviance. In this theory, deviance happens when society prevents people from achieving socially acceptable goals through socially acceptable means. When a person is labeled as deviant, they can be prevented from doing this. They can, for example, be put in a “track” at school where they are not given much chance to do the sort of advanced work that they need to really get ahead. As they see this happening, they will feel frustrated and will become truly and permanently deviant.
The more likely answer, in sociological terms, has to do with labeling theory. Where the idea of strain was a part of structural functionalism, labeling comes from symbolic interactionism. It says that in some ways we absorb the labels that society assigns to us and we then conform to the image that goes with those labels. What that means is that a person might not feel like a deviant. That might not be part of their self-image. But then they are labeled as a deviant and they start to feel that way. Once the label “deviant” is part of their self-image, they try to live up to that image.