You expected it to be poor and therefore sorted out the things
Halfords should have done. For you it was the path of least resistance, less hassle than taking it back and arguing the toss with the shop manager. I would have done the same, because I trust my own work more than a min wage spanner monkey in retail. Halfords got away with selling a substandard product because to you the value was good enough to swallow some DIY fettling time. A mechanical numpty buyer would have just tried to ride it straight away then started moaning loudly about the build quality.
Halfords get away with it because they are a national chain and they sell a lot of bikes through C2W. The convenience outweighs the mediocrity for enough buyers.