That red wire is probably because you have a double or more switch on the wall. One for light and one for fan. You can safely tuck away the extra wire, and from. The switch you can also safely detach the extra wire. In your case red, and reallocate that switch or simply disable it. I intend to replace that switch with a seat for the fan remote