This is because "close" has multiple meanings and pronunciations:
* Close (pronounced "klohz") meaning to shut or to bring together.
* Close (pronounced "klows") meaning near or nearby.
Both spellings are the same, but they have different meanings and pronunciations.