If your server has been set to use nickserv with a password; and...

If you put a channel in your favourites and mark it as "Join on connect" and if the channel is mode +r (which means "you need to be identified with services" before joining) ...

Then mIRC attempts to join the channel before identification has succeeded.

You cannot tell in advance whether the channel is mode +r, so before autojoining any channel on connect, if the server is defined as using nickserv identify then mIRC needs to have sent the nickserv identify and either received a "-NickServ- You are now identified $me" notice or waited for a period of time to elapse (say 1s) before attempting to join the channel.