The way the switches work is different when it is used as a limit or as a home switch,
Whe it is a limit switch, the switch closes (or opens, depending how you have them wired) and triggers the "limit", and as you say, activates the e-stop.
On a home movement, what is supposed to happen is that the switch closes, then the axis reverses and the switch opens again - which triggers the "home" .
What is happening is that your switch is noisy - i.e. it is making a poor contact - and when the axis reverses, the switch appears (to the computer) to open - completing the move> this only takes a millisecond. In actual fact, what has happened is that your switch has opened for a fraction of a second and then closed again - and when the computer reverts to checking the ";imit" switches it finds this one still closed and triggers the limit.
As Hood says try adjusting the de-bounce on the switches (this is a "repeat" time the computer looks at the switches to make sure they are where it thought they were), and another thing to try is the speed at which the "home" movement takes place. This is set as a percentage of max speed. If you are having trouble, set it a little higher and the switch moves a little further "open" so avoiding re-triggering the "limit"
Another thing to check is - is there any spring return on your Z axis. I had a very strong one on mine, and had to "derate" it to get the movement working to the satisfaction of the computer.