Why do you think it doesn't make sense? In the worst case inventing AI before solving economic and political problems could potentially cause a massive societal collapse, hunger and/or poverty.
I think it makes perfect sense to get our act together before creating something that can be so potentially devastating, to reduce the likelihood of bad outcomes.