Mostly these two countries are going into world cup with sometime we have Iran or Saudi Arab because these are able to spend good amount for their teams, but many countries are not having good structure and leagues which help them for improving quality and competition in this region.
CAF teams are always at a disadvantage, because many of their top players migrate to UEFA nations. AFC doesn't have any such disadvantage. The only reason why the AFC teams are not performing is because of lack of quality in domestic leagues. The best AFC players opt to participate in European leagues such as EPL, rather than playing at home. Two decades back Japan even tried the idea of importing a few players from Brazil and giving them the local citizenship. They thought that it will improve the quality of the local game. But didn't worked out that well.