Does a brand-new bike bought online need a service before riding it?
I took the bike to another bike shop.

The man there adjusted my handle bar (apparently when I did it myself, it was not good enough, not straight or aligned).

Then he put the bike on a stand and checked gear shifting to all the gears.  It all worked fine.

He also pointed out the slight rattling noise I heard is caused by the chain rubbing against the front derailleur.  This is normal and can be corrected by "trimming".  This YouTube video explains "trimming" the front derailleur.

The man said the bike is fine to ride.  I asked him when I should get it serviced, he said: "in 3 to 6 months, depending on how much you ride."

He also said not to put any lubricant on the chain because the factory has already done that.

I was in the shop for 10 minutes and he didn't charge me anything, even though I was more than happy to pay him for his courteous and informative service.

Clearly this is the shop I'll take my bike to for the next service.

So to answer my own question, it's advisable to have a professional check out the bike before you ride it, unless you're experienced with bikes yourself.  You don't need a "service" per se.

Like with all new products, one should study the owner's manual before thinking there's something wrong with the product.  I should think the owner's manual discusses "trimming".