If you read the source material, the 1986 German book "Das Parfum", there is a much more detailed and nuanced depiction of the fact that scent is used as a metaphor for the soul.
Scent is this ephemeral thing that is both formless but rigid.
If you remember from "The Magic Schoolbus" there is the (albeit simplified) depiction of how scent is sensed via receptors that are sensitive to form and specificity of the molecules:
Light is sensed by the eyes based on wavelength (or frequency, if you like) which also incurs an electrochemical reaction.
These are real, natural phenomena that are wholly physical but conceptually intangible. Even though our bodies can and do react physically to scent and light and sound, it can be hard for us to really explain them, to give them tangible context. They have these other-worldly qualities.
In the film, which was more or less a chopped-up presentation of the book, there is the focus on Grenouille's enamoured adoration of specific scents of specific women. In the film, it is about their beauty. In the book, it is more specifically about their beauty and about the fact that they are just past the point of puberty.
This is all presented as a correlation to the flowers that are used in regular perfumes. The flowering of a plant indicates that it is ready for the sexual reproduction process to mix genomes and create fruits. This is, biologically speaking, not too far off from how we as animals reproduce sexually. There is a genetic duality; that is biological sex.
Grenouille is born without a scent, and in the book it is made more clear that this means he was born without a soul. He is without a soul in a world of people who have souls. He is an alien in his own world.
What he learns as a child is how smelly people are. He can smell their food and their flesh and their interactions with one another. He is in Paris at the time of a huge wealth gap, an obsession with haughty hygiene, but a lack of organized sanitation. The rich are just as sweaty and dirty and "gross" as the poor, but they douse themselves in perfumes, they hide their stench, and they exude their wealth through their scent. Their worth is reflected in their scent, and for Grenouille as a person with no scent and yet a superhuman sense of smell, he comes to the opposite conclusion: their scent is what gives them their worth.
The soul is the scent.
If you smell beautiful and desirable and "ripe" -- like a flower -- then that is what you are. The clothes may make the man, but the scent makes the person.
It's glossed-over in the film, unfortunately, but the scene in the cave is a particularly interesting aspect of Grenouille's story. First he wants to learn all he can about perfume because of the peach girl. Her scent vanished when she died, the greatest thing he'd ever experienced and in his panic he had killed her to keep her quiet, but that meant her soul left her body. Her scent, her soul, was gone forever. Grenouille, as someone without a soul, is addicted the power and presence and beauty and love of it. It consumes his being.
He was trying to learn how to recreate it, but then his teacher explains to him that he can't extract the scent of a cat like he can with a pile of rose petals, and this crushes him. Because to him, he could smell the difference, but he couldn't create it, he couldn't make it real. It was the struggle of the mind seeing and believing, but the limitations of the world around him. Deranged as it was, it was the human struggle of the limitlessness -- sometimes terrifyingly so -- of our minds.
Grenouille goes to Grasse to attempt to learn a new method for extracting scent, but he finds himself distracted by the cave during a rainstorm. He has found a tunnel/cave so deep and dark and small that there are no more scents. He was used to the cacophony of Paris, and here he has found silence. Like a monk, he spends months in this cave, and in the book they depict it more in detail. He creates a library of scents and has ghost butlers bringing him new scents every day to revel in. He doesn't see good or bad scents, he sees interesting ones. And every night before sleeping, he remembers the scent of the peach girl. Eventually, he reflects on himself, and that is where -- after months of solitude -- he finally realizes he has no scent.
He scrubs himself in the rain and with the dirt and he can smell all his clothes, all the food he's eaten from months and years before, but he can't smell himself. The thing he knows deepest and loves and cherishes and obsesses-over the most in the world, is completely foreign to him. He is completely devoid of scent.
This is where he makes his decision to create a perfume that embodies his understanding of scent, he will capture beauty and create himself a soul, the most beautiful and desirable and charming and undeniable soul that anyone has ever experienced.
He uses the beauty of the 13 girls, with the 13th being the exceptionally beautiful virgin daughter of one of the wealthiest families in Grasse. She reminds him of the peach girl, if not possibly even more beautiful. In the film, since they cannot depict scent, they use their red hair as a symbolic reference to roses, this most cherished staple of perfumery.
Grenouille is captured, but he has achieved his goals and created a soul. His scent, his soul, is so pure and powerful and transcendent, that he has the church and crowds and even the father of the girl he murdered fall down and beg his forgiveness and mercy and beg for his love. He creates such an aura of passion and love with his scent that people just start going crazy on each other, and he causes a city-wide orgy. Everyone was there with such insurmountable hatred for this psychopathic murderer, but with his distillation of beauty and passion and purity into this tangible soul, he has transcended the physical and created a kind of divinity on earth.
After this, though, Grenouille feels he has no purpose. He couldn't possibly create anything purer or greater, and he feels that he has no reason to continue just experiencing the scents of the world. There's nothing more for him in the world, all he wants to do is be the embodiment of his scent, his soul, that he has created.
It's not that the purpose of the perfume changed, it's a metaphor for the divinity, the concentration of it.
The Judeo-Christian-Islamic traditions teach of the soul as a kind of living embodiment of the divine. There is God, and we are made in the image of God, and that what survives beyond the bounds of our world, beyond the edge of death, is our immortal soul. It is our being, our personhood, our light in the universe. This is similar in the Asian traditions of reincarnation and karma and samsara and enlightenment. What transcends reality is the purity, the soul, the light/lightness of our being.
Grenouille created a soul, he created love. God is love. By just a whiff of his handkerchief, he inspired an orgy, even among the devout and celibate. It transcended sex and gender, it was an orgy because people were inspired to consume one another, to become one another, to be and be inside of one another, to "know" one another, to reach each other's souls.
In the Christian tradition, Jesus performed the transubstantiation of bread and wine into the body and blood of the only living human child of God -- the living nature of the divine. He shared this, and it is shared daily or weekly by devout Christians as the belief that the consumption of the divine is to partake in the gift of divinity, a reminder of the soul, a reminder of the unseen that inspires goodness and faith and perseverance of the traditions of the religion for their eventual transcendence into the presence of divinity after death.
Grenouille gave the crowd a whiff of the divine, and they very nearly consumed one another. They were overtaken with such strange passion, that they had their orgy. When he doused himself fully in the perfume, he inspired the poor and the hungry to be so overwhelmed with the purity and divinity that they devoured him entirely.
It wasn't about love versus cannibalism. It is about the consumption of divinity.
The soul is divine. We have souls. We have divinity. If we become part of one another, if we "consume" one another, we are consuming a bit of divinity. Obviously we can't and won't and shouldn't eat other people, because that's murder, that's destruction. What we can "consume" of one another is our passions and our cares for one another. We can stoke the flames of passion, we can inspire love and companionship, and our "chicken soup for the soul" can be our love for one another. In the Christian tradition, Jesus went above and beyond, Jesus was saying that the wine and the bread that gave people nourishment and joy and made people warm and full and happy -- carbs and drugs (alcohol) -- could be replaced by the divinity of God in the form of the flesh and blood of humanity. In our own flesh and blood, there is divinity, there is our soul. The Christ, the Judeo-Christian Messiah, was teaching that their own sacrifice, their own flesh and blood, could satiate us all, and prevent us from needing to kill or consume or hurt or conquer or destroy one another.
In "Das Parfum", and "Perfume: The Story of a Murderer", Grenouille took on this antithesis to the Christ, but with a similar act of consumption. Grenouille had no soul, so he created one. To embody it, was to inspire his total and entire consumption. He used death and murder, extracting the ephemeral beauty of the innocent to create his divinity on earth. The only rational ending is for that divinity to cause his own destruction, his own consumption. For all his obsessions, he crystalized and clarified obsession into this exact formula, and the only way the world could react was devour him, wholly, overwhelmed by the passion and the purity, that they had to make it a part of themselves, they had to have it.
There was no change, it was the unavoidable conclusion.