Water molecules can function as both acids and bases. One water molecule (acting as a base) can accept a hydrogen ion from a second one (acting as an acid). This will be happening anywhere there is even a trace of water - it doesn't have to be pure.
for further detail pealse visit the page: http://www.chemguide.co.uk/physical/acidbaseeqia/kw.html
I think it's because [H3O+] = [OH-].
it's bcz water exist as (HO3+) & (OH-)
while (HO3+) acts as acid (OH-) acts as base.