Barmar's answer rightly emphasizes the point that the author's use of agree in the quoted sentence would be most appropriate if, prior to that sentence, the text cited a person making the same general argument that the "some people" in the quoted sentence agree with. In journalistic English, however, it is not terribly unusual to encounter a sentence like the quoted one even when there is no mention earlier in the article of the view that "some people agree" with.
This situation raises a couple of problems regarding authorial intent. First it leaves the group of "some people" essentially agreeing with each other—in which case we may reasonably ask why their agreement isn't expressed more simply as "say" or "assert":
While some people assert that there are fewer women in science because they don't have the skills, others argue that it [the gender imbalance] is just because science is a strongly sexist field.
Second, if it is important to describe the first batch of "some people" as agreeing with each other, why isn't it equally important to describe the second batch—the "others"—as agreeing among themselves, too? That is, why not put it this way:
While some people agree [among themselves] that there are fewer women in science because they don't have the skills, others agree [among themselves] that it is just because science is a strongly sexist field.
In situations where "agree" simply means "share among themselves the view," I don't see it as a very useful word choice—particularly as it may lead readers to wonder why (in this case) one party to a controversy is described as "agreeing" while the other side is characterized as "arguing." If the reporter means to act as a genuinely neutral observer and recorder of the controversy, it probably makes more sense to dispense with differential word choice and use "say" for both sides:
While some people say that relatively few women are in science because women as a group tend to lack the necessary skills, others say that the disproportionate numbers reflect the deeply engrained sexism of the field.
When a writer uses different verbs to characterize how opposing groups present their views, readers are justified in wondering whether the difference in word choice reflects the writer's own preferences on the issue. In other words, a suspicious reader may wonder whether "While some people agree that..." isn't implicitly saying "While some people agree [with me] that..." Such doubts do not bolster the author's credibility.