My unbiblical opinion is if this world was perfect and there was no pain, why would Heaven be needed.
Pain is to let you know you’re alive and let you know you love somebody.
Pardons if that sounds too flippant.
Maybe not Biblical, but still a good point. We have something to look forward to.