They were business partners, as well as friends and bandmates. All four signed publishing contracts with Northern Songs; Lennon and McCartney owned nearly half the company at one time. They were also partners in Beatles Ltd., which became The Beatles and Co., and later Apple Corps Ltd.
When Dick James (the Beatles' music publisher, who oversaw Northern Songs) sold his Beatles interests to Associated TeleVision (ATV), it led to Lennon and McCartney losing their publishing catalog. McCartney ultimately sued to break up the business partnership between the band members.