As I know normalize() removes any redundant elements from the given path including single dot and double dot. Then why it removes \programs\ element?
..
refers to the the parent directory. In other words, /programs
brings you forward and /..
brings you back.
The Javadoc of Path#normalize()
states
If a ".." is preceded by a non-".." name then both names are considered redundant (the process to identify such names is repeated until it is no longer applicable).
So \\programs\\..
is redundant and removed.
I can't answer your second question.