This may be the completely wrong way to think of it, but it has helped me. I think of the anode as having a negative core, repelling electrons away from it. But if electrons are leaving, then something needs to become positve, the outer layer, causing anions to attract. Opposite for cathode, positive core attracting electrons which cause a negative outer layer, thus cation attraction