Not enough body mass. A hamster weighs like what, 4 ounces? As previously established a cow weighs 3/4 of a ton. You would have to milk a hell of a lot of hamsters to equal the output of a cow.
Except not - a pig gives as much milk as a cow. All creatures give the same amount of milk at the same rate.
In fact, pigs are the only non-grazers of the bunch, so pigs are by far the best milkable animal.
I'm talking about in real life. Despite what the Simpsons and Heather Mills might tell you, rats and pigs will never be effective dairy animals for reasons that are not directly related to their size and which are most easily explained with a somewhat outdated biological theory called r/K selection.
in essence, an animal is considered "r-selected" if if produces relatively large numbers of small, high-mortality offspring compared to another animal, and "K-selected" if it produces relatively small numbers of resource-intensive offspring that are more likely to survive to adulthood. Compared to a cow, pigs and rats are r-selected- they have big litters of small babies and in most cases most of them will die (or get eaten by mom- it happens a lot in pigs!)
All dairy animals are K-selected compared to pigs and even in some cases to meat animals of the same species; for example, dairy goats have fewer offspring than meat goats and only have two teats on their udders, compared to the 4-6 on many meat goat breeds. Fewer teats means easier to milk, period. Dairy goats have 2 teats, dairy cows have 4, and both produce milk continuously over periods of several minutes. Pigs and rats have anywhere from 12 to 18 teats, which only produce milk in brief spurts, which means more frequent and labor-intensive milkings would be necessary.
In theory you could breed a milk pig with fewer teats, but it would be tough. The immediate wild ancestors of domestic goats and cattle were K-strategists and it wasn't a big leap to make them into milk animals; for pigs it would take longer and might end up impossible. Tapirs would actually be better choices once domesticated, since they are strong K-strategists (tapir- 1 baby every two years, which is less than cows.)
Kangaroos are K-strategists, with 1 baby every 1.5 years and even better they are naturally permanently pregnant and lactating. Unfortunately as a marsupial they have evolved to suckle continuously and thus would be unsuitable for session milking, so I doubt that a kangaroos dairy could work unless you invented a pouch-portable, continuous milker.
And yes, humans are K-strategists compared to most animals, but there are a few creatures that still have us beat- whales, elephants, albatross (who might have 1 baby every 10 years), tuatara, and a number of other long-lived species.
Most fish are r-strategists- think caviar- but some sharks present an interesting and bizarre exception. Live-birthing marine animals are usually K-selected compared to egg layers; few marine species produce large eggs. Some species of sharks create many embryos in their wombs but then only give birth to a couple of live young. What happened? The fetal sharks eat each other! Natural selection in utero! Who needs a placenta when you can eat your siblings? They might be though of as r-strategists in the womb and K-strategists to the world as a whole.
Almost all invertebrates are r-selected compared to vertebrates, and most plants are r-selected compared to animals, as they produce enormous numbers of low-energy seeds. Monocots like grasses and palm trees are the most K-selected of plants; a strongly K-selected plant is the Coco de Mer, each seed of which takes 7 years to grow and another 2 to germinate. Fungi and non-vascular plants are the consummate r-strategists, since they will produce millions or billions of spores of which only a few need to survive.