Nowadays, smartphones come with lithium ion (Li-ion) batteries with partial charge that can get fully charged within about 2 h.
However, manufacturers still insist on charging them for 8 hours before the first use. This is probably because the charge levels indicated when a new gadget is first switched on, may not indicate the true level of charge in the battery. If the actual charge is very low, when you switch on the new phone and start installing apps it may get switched off in between. The manufacturer does not want the customer to have a bad first impression!