A relationship may provide physical companionship and comfort, but you can still feel very lonely even in the presence of your partner without the emotional connection provided by intimacy.
By contrast, intimacy provides you with a sense of belonging, acceptance and connection that helps you feel less alone in the world even when you are physically alone.
Finally, don’t confuse being alone with feeling lonely. If you cannot tolerate being alone, you will always be in search of someone else to fill the hole, which only you can do for yourself.