Of the 27 cars I've owned since I was 16, 15 of them were brand new. Sorry to say that only a few of them came with no immediate issues. From defective trim, to engine noises, they all seem to have a problem, some easily fixed, one spent weeks in the shop. They're assembly-line built, imperfect machines, unfortunately.
Luckily enough, my '17 3.7 Mustang was one of the good ones, although I didn't have it very long, the experience was uneventful. I used this car to talk my sister-in-law into buying a Mustang, although she went with a '17 2.3 in an effort to eek out that all-important 2 mpg on her long commute to work.
The day after she bought it, she got an airbag light, and it was in the shop for a week. She began her ownership experience with discouragement, and I felt kind-of bad, having worked on her for weeks, persuading her to buy it. It's the nature of the beast.
Something irregular happened while your car was being built. Rough pulley, bad belt....who knows. Same goes for my sister-in-law. A hastily-assembled, likely Chinese-built sensor was put in her car and failed after 18 hours of ownership. So we trudge back to the dealership and wait..... Considering how many components go into a modern car, I think we're lucky we don't all spend a lot more time in the waiting room.
Don't let it color your feelings for the car. Believe me, I've been there...many times.