This is a feature of the USGA Handicap System known as Equitable Stroke Control (or ESC), and its purpose is to prevent one terrible hole during an otherwise solid round of golf from skewing that round's impact on the golfer's handicap index.
ESC sets a limit on the scores golfers can turn in for handicap purposes on individual holes based on the golfer's course handicap. For example, a golfer with a course handicap of 24 has a maximum score of 8 on any given hole.
To learn more about ESC and to view the per-hole maximum scores, see our related FAQ on the subject:
What is Equitable Stroke Control?