As someone with a background in math, I think that makes total sense. I don't feel like there's any magic reason why practicing reasoning under (one of the many paradigms of) mathematics would automatically carry over to the type of reasoning you practice while programming any more than the previously mentioned exercises.
The only times math has helped me is when the programming I'm doing straight up references mathematical concepts I've practiced with (matrices, group theory, etc). Which is a pretty uncommon occurrence in my current position.
If you want your background in something else to help you with programming I think you'll have to put conscious effort into identifying and using the relevant abstractions and metaphors