The fact is that your dog really isn't trying to mate with a cat, of course.
Dogs usually engage in mounting behavior as part of play, as a show of dominance, or out of just sheer obnoxious excitement.
The truth about cats and Dogs is that cats will also use mounting for the same reason that dogs do.