The "possessive" or genitive -'(s) construction in English has several uses.
In modern English, the most common and productive usage is to turn an entire NP (or DP, depending on what framework you're working with) into something that functions as a determiner (also called a determinative by some authors).
For example, we can turn the NP "the men" into the determiner "the men's", and combine this with the noun "clothes" to get the NP "the men's clothes" meaning "the clothes of the men". In this construction, the initial determinative word functions as the determiner of the possessive noun, not of the "possessed" noun: for example, we say "a man's clothes" even though we can't say "*a clothes", because the structure is "[a man's] clothes", not "a [man's clothes]".
Semantically, this construction often refers to ownership or possession, but it doesn't have to: we can say things like "the mountain's peak" (="the peak of the mountain"), although the mountain does not own its peak.
A less common usage of the -'(s) genitive construction is to form something that functions as an attributive modifier of the following noun.
This is how it is used in "men's team": a preceding determiner doesn't group with the word "men's", but with "men's team" as a unit, as evidenced by the fact that even though we can't say "*a men", we can say "a men's team" (which presumably has the structure "a [men's team]"). Other examples of this construction are given in the following question: articles with the possessive nouns in the plural (I recommend ignoring the answers there): "a women's magazine", "a wolves' den', "a girls' school".
There is a definite consensus against omitting the apostrophe at the end of a noun used in the first construction. I don't know of anyone who would not consider spellings like "The young mens clothes" (= "[The young men]'s clothes" = "The clothes of the young men") to be erroneous.
Some people seem to feel like the apostrophe is not needed, or even somehow improper, in the second construction. For references about this point, see Edwin Ashworth's answer to Is it correct to say "I write children books" (not possessive case)?, although the cited sources seem to no longer be available.
I wouldn't recommend ever writing "mens" (aside from in a proper name)
(The following part of this answer is a bit of a peeve, so feel free to ignore it. I also haven't researched it very well.)
To me, writing "men's" without an apostrophe, as "mens", seems kind of misguided. I can discern two main motivations, neither of which seems convincing to me:
The desire to avoid dilemmas about plural possessive vs. plural attributive noun, or possessive plural vs. singular possessive, for words where these are pronounced identically. (E.g. how do we know whether to write "a ladies' man" or "a ladies man", "a dog owner's guide" or "a dog owners' guide"?) A similar desire for ensuring uniformity by establishing a policy in favor of omitting possessive apostrophes seems to be behind the now-conventional omission of apostrophes in most geographical names in the United States.
Some idea that these are somehow not real "possessives". The convention of calling the -'(s) construction the "possessive" seems to have led some people to mistakenly believe that -'(s) can only be used to refer to ownership or the most literal kind of "possession", not other, more vague kinds of associations. This seems to be part of what's behind certain grammar superstitions, such as the (incorrect) idea that -'(s) cannot be used after inanimate nouns/NPs, and the idea that it's preferable to say things like "Parkinson disease" or "Alzheimer disease" rather than the traditional "Parkinson's disease" and "Alzheimer's disease". (For a more in-depth look at the use of the possessive in medical eponyms, see "Whose name is it anyway? Varying patterns of possessive usage in eponymous neurodegenerative diseases", by Michael R. MacAskill and Tim J. Anderson, and "The synthetic genitive in medical eponyms: Is it doomed to extinction?", by John H. Dirckx.) I suspect that this misconception is also, at least in part, behind the spelling convention that is the topic of this question. Since "a men's team" generally refers to a team composed of men rather than a team owned by men, someone who believes that -'(s) can only be used to mark ownership might assume that it's better to leave out the apostrophe and write "a mens team".
To me, "men's" seems like a perfectly fine spelling for both uses of the "possessive"/"genitive" form of men. Trying to distinguish between "mens" and "men's" bothers me because it seems like an added complication or inconsistency in the use of the apostrophe. The only circumstance where I would choose to write "mens" is if I was writing the official name of some organization that has decided to spell its name without an apostrophe. However, you are free to make your own decision about how you want to use apostrophes.