I know that the Stuart light tank had around five or eight rounds of canister shot, but it boggles me (at least as an Early Modern historian) as to why it has canister shot in the mid-20th century. Why did it take canister and why didn't any other tanks (at least to my knowledge) not keep a few rounds of it as well?
The M5 isn't the only tank to be equipped with canister rounds during this time period, and case shot had uses. The T-34 "SH-350" round was a case shot, and Russian 45 and 57mm guns were also capable of firing case shot with rounds specifically made for them. The list goes on; and as a little digression I have to note that there are quite a few types of rounds that rarely get alot of attention, such as star shells for the Germans or Americans being used late-war.
Now, asides from being able to help dislodge infantry in certain situations where HE may not be as effective (e.g: Effective field-works, foxholes, etc), the terror and suppression effect of canister remains as potent as ever. Its lack of high explosive killing power also had niche advantages when tanks were operating in unfavorable conditions.
A prominent example is column defense; firing HE in or around friendly tanks being swarmed is still risky: A direct hit could still cause penetration, spalling or a partial penetration (which could potentially lead to engine fires if from the rear) and cause an egregious case of friendly-fire. Indirect shrapnel bursts could potentially damage the mobility or reduce the effectiveness of the tank in front of you in the column as well. Track damage, optics, radio damage are all strong possibilities, and these would compromise the tank's further effectiveness.
By contrast, shrapnel poses a very reduced threat of causing a friendly mobility or mission kill on a tank being swarmed, and in addition to coaxial and hull machinegunning could rapidly ensure that close-in infantry would be driven off from threatening positions. It could also be highly useful in urban terrain, preventing the potential collapse or spray of large-debris from urban surroundings, which could be equally damaging as a direct HE hit on friendly armor.
Finally, never discount the 'shotgun effect'; acquiring a firing solution at such close range could be incredibly difficult. Many things must be considered, the traverse speed of the tank, the ability to depress or elevate the gun, the FOV of the sights, in acquiring a target. Case shot reduces these needs by a wide margin, with the spray of the case ensuring a lethal effect even with gross inaccuracy.
Present day 120mm and 105mm tubes are still using canister, in the form of tungsten balls. Devastating stuff.