Actually, there may be an entirely valid pedagogical reason for this. If some of your students come with little background, say in programming, then they need to get experience with it to be successful later. I assume these early courses are heavy, at least, in programming.
It turns out that people learn, primarily from reinforcement and feedback. That means repeating things, to some extent, so that lessons are deeply learned and insight arises from both practice and the feedback that ensues.
Many students come to a CS degree already having learned quite a lot about programming, though they may also have misconceptions. But the A course is likely intended to take the other, relatively inexperienced, students up to the level of those with a programming background earlier. Thus, students start B at more or less the same level of skill and insight, making that course easier to deliver and making more students successful.
But taking out the overlap would probably be a mistake and give worse results, as students would, then, get less reinforcement of those topics. You don't learn something by seeing it only once. And it is harder to learn a lot of topics if the first time you experience it, it is in a sophisticated context. Introducing important topics gently and then reinforcing them later is a learning technique that many people use. It is called a Spiral Approach, where each turn of the spiral takes you deeper into the topic.