Romans 1:
26 For this reason God gave them over to degrading passions; for their women exchanged natural relations for that which is contrary to nature,27 and likewise the men, too, abandoned natural relations with women and burned in their desire toward one another, males with males committing shameful acts and receiving in their own persons the due penalty of their error.
28 And just as they did not see fit to acknowledge God, God gave them up to a depraved mind, to do those things that are not proper, 29 people having been filled with all unrighteousness, wickedness, greed, and evil; full of envy, murder, strife, deceit, and malice; they are gossips,
The question about WHY should be related to the question about TO WHOM ... In verse 18 (Rom. 1) it says who is this passage about:
Rom. 1:18b ... against all ungodliness and unrighteousness of men,
who hinder the truth in unrighteousness.
There it is; it says to whom and why ...
TO WHOM: to ungodly and unrighteous men
WHY: because they hinder the truth in unrighteousness.
A similar passage here, talking about people who are plagued by their own wrong ideas and unhealthy behaviors, brazenly acting improperly, and opposing the truth out of sheer vice:
(The Emphasized Bible) 2 Tess. 2
6 And what now restraineth ye know, To the end he may be revealed in his own fitting time; 7 For the secret of lawlessness already is inwardly working itself,—Only until he that restraineth at present shall be gone out of the midst:
8 And then shall be revealed the lawless one,—Whom the Lord [Jesus] will slay with the Spirit of his mouth, And paralyse with the forthshining of his Presence:—
9 Whose presence [shall be] according to an inworking of Satan With all manner of mighty work and signs and wonders of falsehood, 10 And with all manner of deceit of unrighteousness in them who are destroying themselves, Because the love of the truth they did not welcome that they might be saved;—
11 And for this cause God sendeth them an inworking of error, To the end they should believe in the falsehood,— 12 In order that all should be judged Who would not believe in the truth But were well-pleased with the unrighteousness.
Apostasy is about that: a certain class of people who blatantly oppose truth and righteousness, even believing themselves to have the authority to do so.
Apostates and others who act in the same way as them, even if the latter claim to be "Christian" people, religious, or believers, are the people whom God hands over to the inevitable result of their own misconduct and love of evil. We can see these consequences in the real life of people who say they are Christians, but who do not like the biblical principles, nor do they really want to learn biblical truths but, since those principles conspire against their own "style of life" and those truths do not converge with their own ideas, THEN they become direct opponents, enemies of the ones who do differently. They carry in their personal lives the consequences of their actions. And those who don't, at the end, will see what those consequences are.