Steller's Jays are in the same genus as the Blue Jay and they also expertly mimic other birds, especially raptors. They learn the calls quickly and keep the calls in their repertoire for only a few years after the model has left the area. While locating and re-locating many dozens of goshawk, Cooper's, sharpshin and Zone-tailed Hawk territories over 40+ years I've found that once a pair of hawk vacates or moves more than say 1/4 mile to a different alternate nest area, the jays (which I'm assuming are pretty sedentary) in the old area keep giving gos calls (both the alarm and begging) for maybe 3-4 years after they are no longer exposed to the hawk's calls on a daily basis, at which point the mimicry fades out of the jays' repertoire. Once a new pair of hawks takes up residence, the local Steller's start imitating the hawks right away, within a couple of weeks.
The function of jays imitating hawks probably has to do with alerting close relatives to the presence of danger and thus has survival value there. The function of imitation for mockers and other mimids has been studied and has do with with sexual selection. With parrots, I'm not sure why they do this but it may have to do with kin recognition in long-lived, social, serially-reproducing organisms. I'm not sure why jays would imitate a large woodpecker but I bet there's some survival value behind it somewhere.
It's handy to have Steller's Jays available to give imitations of gos and thus a clue that there's a nest around. Jays giving gos calls have fooled many a junior field tech, but one good clue that it's a jay and not a gos is that the 4-5 sec. segment of imitated calls always sounds exactly the same - like it was a mechanical playback with the same grouping and inflection each time it's broadcast by the jay. It would be interesting to see if Blue Jays who appear to be imitating IBWO do this too, i.e. whether multiple series of the 'kent'-type calls they give produce similar-looking audiospectrograms.