Why Role::getPermissions() method return an empty array for admin users?
That is because a role that is marked with is_admin (which from the UI is possible for just a single role) has all the permissions. Consider it as an extension of the user #1 concept; the difference is that there is just a user #1, but there could be many users assigned to the role marked as is_admin.
In fact, the code does the same it does for the user #1: It explicitly checks for the role being is_admin. So, returning an array of permissions that will never be used doesn't make sense. See Role::hasPermission().

  if ($this-&gt;isAdmin()) {
    return TRUE;
  }
  return in_array($permission, $this-&gt;permissions);


Similar code is present in other functions/methods, for example Role::revokePermission().

  if ($this-&gt;isAdmin()) {
    return $this;
  }
  $this-&gt;permissions = array_diff($this-&gt;permissions, array($permission));
  return $this;


As for why Drupal uses that code, it is because from the UI it is possible to change which role is marked as is_admin, including one for which permissions were already set. Once it is marked is_admin, the permissions explicitly set can be ignored, but they are kept, just in case you change from the UI the role marked as is_admin. In such case, you would not want to set again the permissions you set for the old is_admin role.