These r/AskHistorians answers may be of interest to your question:
https://www.reddit.com/r/AskHistorians/comments/fnxbuc/what_happened_to_body_armor_helmets_between_the/fm2ctzd/ by u/wilymaker
https://www.reddit.com/r/AskHistorians/comments/5udybq/how_effective_was_plate_armor_against_musketballs/ddth6f6/ by u/WARitter
This paper (unsigned but with a substantial bibliography) says "[Muskets] were also tested for armor piercing capacity. Shot from a variety of weapons penetrated mild steel an average 2.7 mm (about 11 gauge) at 30 meters, or 2 mm (12.5 gauge) at 100 meters. One of the pistols was fired a ta distance of 8.5 meters at a breastplate made in Augsburg around 1570, made of cold worked steel 2.8-3mm thick,or about 8.5 gauge. The breastplate was mounted on a sandbag covered in 2 layers of linen, to simulate an undershirt. Surprisingly, the bullet pierced the breastplate, but not the linen ! The bullet dissipated its force piercing the plate, and didn’t even generate metal splinters. However, a modern 3 mm steel plate lined with linen didn’t fare so well"
Edit - appending here my answer to the deleted comment below, for better visibility:
Whatever the armor's performance, the more definitive answer is about how economical it was: budgets in Europe quickly shifted to handing out a musket to as many cheap infantry as possible, to the detriment of, first, armor and then later pike. In comparison to this fundamental allocation trend, the armor's effectiveness question was optimization at the margin.
The reason why those Japanese and Chinese musketeers wore armor may just be that, at those specific times and places, melee weapons were still an important part of the fight.
While firearms were increasing in importance during the period of the sengoku era, they did not replace other weaponry of the time. In likelihood the armor wasn't for protecting against firearms but the other weapons that were likely more common. Bows were often used in conjunction with firearms to cover for when the latter were reloading.
Link below to another answer discussing weapons that were still used at the time.
While more can be said on the subject, this previous answer on a similar question by u/WARitter provides a solid background on the usefulness of armor against early firearms.
Basically, it comes down to technology. Looking at Europe in particular, harquebuses and early muskets up to around the early 16th century were weak enough that bullets could be stopped by basic plate armor of around 2 mm thick. After that, the armor quality required to stop bullets increases to a point where a distinction was made between pistol-proof and rifle-proof armor.
As rifles improved further, 2 mm became insufficient to stop any bullet, and thicker plate armor of 6 mm or more was needed. Due to the much higher weight, it became impossible to construct and move in a full suit of rifle-proof armor, which means that by the English Civil War (1640s) only partial rifle-proof armor existed, covering only a part of the body. Later in the 17th century both rifle- and pistol-proof armor had become obsolete for infantry soldiers, although thick, pistol-proof breast plates live on until the 19th century for heavy cavalry in Europe (possibly because when mounted on a horse, the heavy breastplate does not impede movement as much, and because pistols or carbines remain the ranged weapon of choice for cavalry up until roughly the American Civil War).
In Japan, the firearm was introduced by the Portuguese in the late 16th century during the Sengoku period of warring states. These matchlock-configured harquebuses were called tanegashima. The Japanese eagerly adopted the new weapon, soon developing their own tameshi gusoku (bullet-tested) armor designs, which were initially roughly on par with European designs. However, once Tokugawa Ieyasu ended the Sengoku period in 1603 by unifying Japan, in large part thanks to his quick adoption of the Portuguese guns, internal warfare (and indeed, all warfare) ceased for over 200 years. As Samurai became administrators and bureaucrats rather than warriors, technological development of tanegashima in Japan slowed down to a crawl, and pistols and rifles were now mainly used for hunting and ceremonial purposes. Tameshi gusoki armors continued to be worn ceremoniously, but Japanese rifles and armors were hopelessly outdated by the time Commodore Perry came around.
Military technology in Ming China was similarly lagging behind. After 1449, the Ming dynasty never again fought an offensive war, instead focusing on (re)building the Great Wall. The Qing, who overthrew the Ming in 1644, did so in large part because they saw the potential of the Japanese and Western harquebuses. However, after taking power, they did not feel the need to further improve the design. Manchu censorship in fact prevented open discussion of many new forms of 'foreign' technology. By the 19th century matchlock rifles were still in widespread use in both China and Japan. These weapons, outdated in the west since the late 17th century, were still weak enough that some armor types could stop bullets, although in mid-to-late Qing China, like in Edo Japan, armors were worn mostly ceremoniously.
Sources (other than the excellent post linked above):
Hacker, Barton C. “The Weapons of the West: Military Technology and Modernization in 19th-Century China and Japan.” Technology and Culture 18, no. 1 (1977): 43–55. https://doi.org/10.2307/3103204.
Waley-Cohen, Joanna. “China and Western Technology in the Late Eighteenth Century.” The American Historical Review 98, no. 5 (1993): 1525–44. https://doi.org/10.2307/2167065.