This is a really common issue then I see every week when I’m out inspecting roofs. On this house the shingles were replaced but some of the flashings were not. This type of flashing is set in the chimney and it is called step flashing. When they just shingle over it there are two problems. First one is that it’s no longer step flashing and won’t work properly. The second problem is that the flashing will probably rust out before the roof fails. So make sure you specify when your roof is replaced that all flashings will be replaced.