Ok but what about joining a google community, does it work the same way ?
Generally. Most Communities require you to join in order to post though. As a member you get to post, and also set the amount of content you want to see from that Community in your feed.
But what about if I share a article from the new york times doesn't the popularity go to the new york times article instead of me ?
Again, it sounds like you're talking about this as some sort of PR shaping exercise. It isn't. You're not giving away PR by linking to a article for discussion. The page you link to may accrue some benefit, but you're not taking anything away from your own profile by doing so.