Thats to be expected

Code:
 set %randnick $nick($chan,$rand(1,$nick($chan,0))) {
  msg $chan %randnick $read(a1.txt,n) 
 }


Since you the the %randnick to be equal to the user that types which results in this if statement to be true

Code:
  if ($nick = %randnick) {
   msg $chan %randnick $read(a2.txt,n) 
  }


Therefore messages both answers


Life is potato.