This is most probably very dependent at least on:
- The specific jurisdiction (country, state, economic zone...).
- Whether the flight was sold alone or as part of a package (together with accommodation, usually, but in some jurisdictions other things like a rental car or activities may count)
In general, it is the traveller's responsibility to ensure they have all the required paperwork, especially as:
- Each traveller's situation is unique. Citizenship, residency, any visas they have, travel history, type of passport, etc. all have an influence, and it can be quite daunting for a travel agent to know all the rules for everyone. Consider that in some cases, even prior travel history may have an influence (e.g. having travelled to some countries will disqualify travellers from ESTA and they must have a "real" visa instead).
- Requirements change over time. Maybe at the time you booked all was well, and 2 weeks later country X decided that citizens of country Y suddenly need a visa. A travel agent can hardly track all of this.
- Traveller situations vary over time as well. A passport expires. A visa expires. Residency changes. And so on.
It is usually expected from a good travel agent that they will inform their customers of requirements that are obvious to them. But even a good travel agent may not be aware of the requirements for everybody. If they are in country X, and all travellers with citizenship of that country don't require a visa to travel to/transit through country Y, then if a traveller from a different country needs a visa, they may not even know it. Most travel agents and airlines will actually inform passengers at length of the most obvious pitfalls, but they can't handle all possible cases.
In your case, I suppose the travel agent was in the US, so their "usual" traveller is probably a US citizen or US resident, who wouldn't need a visa to transit Canada (the US resident may need an ETA, though).
I'd be curious as to the specifics of your travel which would actually required a transit visa, though.
Now, there may be countries with different rules or regulations which require the travel agent to inform the traveller in an explicit manner (and not with a few lines in the middle of the small print) and/or check the traveller actually has the required paperwork, but I don't know one.
Rules may also be different for packaged holidays as opposed to "just flights".