I've definitely had some strange rogue plants before and sometimes I'll leave them in if it won't hurt anything. But I'd rip that one out if I were you, you don't want the roots weaving their way into foundation cracks. Rip it out and seal the crack up!
Plants would remove excess moisture, and yeah, no their roots aren’t a danger or anything. Who doesn’t have plants alongside their house? If a root gets into a crack, you already have a problem and water would already be coming in.