Google Ranking Factor – Link Source Page Context
The immediate context of the page supplying the link likely has a bearing on the semantics of the page being linked-to.
This means that a page whose context is about bananas will pass keyword ranking influence to the page that is linked to, and the linked-to page may receive ranking for the keywords (in the case, words about bananas).
In keeping with what users will experience when reading the text section on the source page, if they discover an outbound link then the expectation is that the page linked to should also be about the same or closely related subject, because the user interacting with the source page indicates interest or engagement in its subject or theme.
The linked-to page may inherit both page-rank and semantic relevance, assuming the link does not carry the nofollow attribute.