Lemmy's federation code is not as mature as Mastodon's. Mastodon is probably the most mature codebase in the fediverse. This means that a Mastodon user sees a Lemmy community as just another user, so they can 'subscribe' to that community and post to it and join in the comments section of posts they've created.
So it's not so much that Lemmy knows not to show Mastodon content, it's more that right right now it's not able to (in a Lemmy-to-Mastodon direction), Lemmy federates very well with other Lemmy instances but not so well with non-Lemmy instances. That will improve as Lemmy gets developed further.
The other thing to bear in mind is that Mastodon and Lemmy present content differently. Mastodon is a microblogging service like Twitter whereas Lemmy is a link aggregator like Reddit. This means that Lemmy content is usually longer and has a title whereas Mastodon content is shorter and has no title. All these things will need to be ironed out as integration deepens.