As had many state over the years that when Paul stated this is His opinion, was jsut that, and not inspired, but the truth would be that Paul meant that the Lord Jesus Himself never was asked/answered that question, noyt that he was giving forth now to us just a good guess or His ntural reasoning on the subject and matter
Paul tells the Corinthian Church in 1 Cor. 7:6 "But this I speak by permission and not of commandment."
He is discussing marriage, that's it's good for them if they don't marry but if they can't contain themselves (the sex drive) then marry, for it's better to marry than to burn with passion.
The Holy Spirit leaves it to the conscience of each individual whether they marry or not, and He allows Paul to give the advice not of the Holy Spirit's commandment to Paul, but by permission for Paul to speak of his own experience.
Then in vs 10, Paul leaves the permission given Him by the Spirit and goes back to commandment.
"And unto the married I command, yet not I, but the Lord"
Paul has now gone back to the commandments of the Lord given to him by the Spirit for us.