Why is one legal and the other not? Makes no sense to me.
Because there are controls within the porn industry.
Prostitutes are far more at risk than a porn star while performing their "job".
And just for the record, prostitution is legal in some places, just as porn is illegal in others!