That's by design, the on text event triggers as a result of receiving a privmsg from the server, when you send a message to a channel, you don't get (receive) a privmsg from the server, you're only sending one.
That's for channel: If you test this with private message, because in this case you receive a privmsg from the server, on text will trigger for your own text.
You can use the on input event to react to your own message, typical structure will look like this:
on *:text:the_trigger:#:{ do_trigger $nick $chan }
on *:input:#:if ($1- == the_trigger) { do_trigger $me $chan }
alias do_trigger { echo -ag $1 triggered the code on $2 }