Why would Ted make such a big stink about Victoria not being a dog person in S01e16 Cupcake, only to force Robin to get rid of all 5 of her preposterous dogs literally exactly 1 season later in S02e16 Stuff? This seems like straight up continuity error.
You're mixing reality and fiction here.
Josh Radnor, the actor who plays Ted, was heavily allergic to dogs. It was uncomfortable for him to be in the set of Robin's apartment even when the dogs weren't there.
Especially when Ted and Robin finally got together and therefore were going to be on the set of Robin's apartment (since Ted's apartment lacks privacy due to Marshall and Lily), the problem became bigger and the dogs needed to go.
Ted Mosby, the character, is a dog person. Ted's character very much stereotypically resembles that of a dog. Hugely affectionate, dependent on his environment, needs to be talked down when he's too excited, runs at things without thinking things through.
Paramedics were called during filming because Josh Radnor had a severe allergic reaction to the dogs especially in the scene where he is petting and being licked by the dalmatian. Up until this episode, Radnor was able to get by with "some Claritin and some thorough vacuuming."
Ted asked Robin to get rid of the dogs because he applied Robin's rule (no things from exes allowed) to Robin (the dogs were from her exes). Although he reconsidered in the end, Robin decided to take them to a farm (literally, not euphemistically).
You can argue that this justification feels a little out of whack, but the necessity of removing the dogs from set for Josh Radnor was more important than the credibility of a single filler episode's storyline.
edit - minor addition
Why would Ted make such a big stink about Victoria not being a dog person?
It is a recurring theme that Ted is excessively focused on the criteria his wife needs to meet. Even if Ted wasn't particularly a dog person, he might still have been convinced that being a dog person would make someone a good match for him.
Similarly, Ted doesn't play the bass (or any instrument as far as we see), yet he requires his future wife to play the bass.