Considering the innate nature of communities, it is understandable that the content on the community and the main site would be related, but thematically different. Essentially, the
community serves a different purpose than the primary site. Hence, it makes sense to host the community on a subdomain -- that way it'd gather its own link value.
There is also an official video by Google which says the crawling, indexing, and ranking mechanisms for both subdomain and subfolder are the same. Check it out here: