Closing and opening recruitment can happen with any roles in the military.
Based on recent history, recruiters know how many people they need to apply to get the numbers to fill the available slots, allowing for those who drop out during selection, training and during their career. If there's sufficient numbers going through they'll stop recruiting, and open it once they need more. Sometimes there'll be a bigger attrition rate, for example if courses are scarce and people get fed up of waiting, or if they are short on candidates for a particular stream.