'Das Weib' and its cognates is or has been neuter in most Germanic languages. The word dates at least back to Proto-Germanic in the period before common era, and was already then neuter. There are conflicting information about the origin of the word. Wiktionary relates the word possibly to Proto-Indo-European *gʰwíh₂bʰ-, which had a different meaning.
One likely explanation, is actually that the word, be it *gʰwíh₂bʰ- or not, originally was of neuter gender, but had a different meaning and therefore did not deviate from the usual correlation. While the meaning changed to 'a female person', the neuter gender was kept.
Several comments and answers seem to implicate that grammatical gender and biological sex are two completely different things. This is simply wrong. There is a strong correlation between grammatical gender and biological sex in all Indo-European languages with a distinction between masculine and feminine genders. The split into masculine and feminine genders is also assumed to be rooted in the distinction between biological sexes and goes back to some time in the Proto-Indo-European period. It is assumed that the Proto-Indo-European language originally only had a distinction between animate and inanimate objects and that the animate 'gender' split into masculine and feminine, while the inanimate gender turned into neuter. In the North Germanic languages and some Slavic languages, there is still remains of a gender-like distinction between animate and inanimate things.
There are exeptions, e.g. the already mentioned German words 'Fräulein' and 'Mädchen', which are neuter because all diminutive forms are neuter, but in general, most words solely referring to male persons are of the masculine grammatical gender and most words solely referring to female persons are of the feminine grammatical gender. With a few more exceptions, but still in general, this also applies to words referring to animals. It is a very legit question to ask why 'das Weib' does not follow the general rule.
Edit: Based on user unknown's comment, it seems that I have to clarfiy, as he didn't understand what I wrote. I do not claim, that all words of masculine gender refer to objects of male biological sex, that all words of feminine gender refer to objects of female biological sex and that all words of neuter gender refer to things. I am saying that if a word refers solely to a male living object, the word has most likely masculine grammatical gender: der Mann, der Ochse, der Hengst. If a word refers solely to a female living object, the word has most likely feminine gender: die Frau, die Kuh, die Stute.
To quote from Wikipedia on the topic Grammatical vs. natural gender:
The natural gender of a noun, pronoun or noun phrase is a gender to
which it would be expected to belong based on relevant attributes of
its referent. This usually means masculine or feminine, depending on
the referent's sex (or gender in the sociological sense). For example,
in Spanish, mujer ("woman") is feminine whereas hombre ("man") is
masculine; these attributions occur solely due to the semantically
inherent gender character of each noun.
The grammatical gender of a noun does not always coincide with its
natural gender. An example of this is the German word Mädchen
("girl"); this is derived from Maid "maiden", umlauted to "Mäd-" with
the diminutive suffix -chen, and this suffix always makes the noun
grammatically neuter. Hence the grammatical gender of Mädchen is
neuter, although its natural gender is feminine (because it refers to
a female person).
Normally, such exceptions are a small minority.