I've been freelancing for over 15 years; occasionally, a client asks me for help putting together a team of freelancers for a large project, so I've had the opportunity to review many test pieces/writer applications. It's possible the OP submitted a flawless sample and got rejected anyway, but I can't tell you the number of times I've received nasty emails from people who submitted error-riddled sample pieces and insisted that what they had written was perfect. The reality is that many people submit samples with multiple errors and/or don't follow the instructions when completing a sample piece.
I'd say that following instructions is even more important than flawless writing, especially at companies that have editors on hand to review each order. If someone submits an order with three typos in it, an editor can quickly fix the typos. When writers don't follow instructions (don't answer the prompt directly, don't follow the required academic citation style, exceed the max. word count or fail to meet the minimum word count, etc.), it takes a lot more time to fix up the order and make sure it meets the client's needs.