Scripture only condemns greedy ministry, not all forms of profit.
There are a couple of passages that could be read this way, that it is only greedy or shameful profit that is condemned:
For many are rebellious and full of empty talk and deception, especially those of the circumcision, who must be silenced. For the sake of dishonorable gain, they undermine entire households and teach things they should not.
As a fellow elder, a witness of Christ’s sufferings, and a partaker of the glory to be revealed, I appeal to the elders among you: Be shepherds of God’s flock that is among you, watching over them not out of compulsion, but because it is God’s will; not out of greed, but out of eagerness;
But there are other passages that just talk about profiting in general:
For we are not like so many others, who peddle the word of God for profit. On the contrary, in Christ we speak before God with sincerity, as men sent from God.
men of depraved mind who are devoid of the truth. These men regard godliness as a means of gain. Of course, godliness with contentment is great gain. For we brought nothing into the world, so we cannot carry anything out of it. But if we have food and clothing, we will be content with these.
It could still be argued that the issue is seeking to profit rather than just profiting. So a minister could then profit from selling resources as long as that is not their motivation for creating them. It must then be asked why almost all ministry resources are sold using commercial practices that open up their authors to profit.
Why don't authors sell until the costs of their labor have been covered, and then stop collecting royalties after that? The way resources are currently sold allows someone to create a resource and then sit back and do nothing further as royalties continue to roll in for the rest of their life and their children's lives (copyright lasts 50-70 years after the author's death).
On top of that, Scripture also condemns the general commercialising of ministry, whether it makes a profit or not:
Condemnation of commercial ministry
There are many passages that directly condemn commercializing ministry.
Most of all, if ministry is to be "freely given" then there is no way to profit in the first place.