As was mentioned it is simply a courtesy that you extend to your employer so that they may have sufficient time to find a replacement for your position, or at least get the process started and in the mean time make arrangements for your duties to be handled.