Linking a contact or company to a deal lets you see who the deal is connected with. This way, you can track the relationship between the opportunity and the people (contacts) or organizations (companies) involved.
For example, if you’re working on a deal with ABCD Inc. and John Doe is your main contact there, linking both John (contact) and ACME (company) to the deal makes it clear who’s part of that opportunity.