mkdir ignores -p parameter if it faces a broken link

Today I encountered a behavior of mkdir which I found a bit surprising.