If we've been directed to seek help and protection from Allah only then why do we say Ya Ali Madad or similiar to this.
Even in Nahjulbalagha Imam Ali A.S says do not ask for help from anyone except Allah in Nahjulbalagha letter no. 31?

Allah is the ultimate source of the need being solved but using a waseela (means) is recommended. See Quran 5:35