Article: Due to the legitimate role that referees play in wrestling of serving as liaison between the bookers backstage and the wrestlers in the ring (the role of being a final arbitrator is merely kayfabe), the referee is present, even in matches that do not at first glance appear to require a referee (such as a ladder match, as it is no holds barred, and the criteria for victory could theoretically be assessed from afar). Although their actions are also frequently scripted for dramatic effect, referees are subject to certain general rules and requirements in order to maintain the theatrical appearance of unbiased authority. The most basic rule is that an action must be seen by a referee to be declared for a fall or disqualification. This allows for heel characters to gain a scripted advantage by distracting or disabling the referee in order to perform some ostensibly illegal maneuver on their opponent. Most referees are unnamed and essentially anonymous, though the WWE has let their officials reveal their names.

Now answer this question: What determines how the referee acts?
their actions are also frequently scripted for dramatic effect