Because there are no links between PKK and YPG.
The question as posed is non-sensical. It uses suggestive term "links" which isn't the actual reality (at least not reality based on the data you yourself use to support your statement, that is the statement by Ash Carter - or rather by Senator Graham).
During testimony before a Senate panel, Ash Carter said "yes" when asked by Sen. Lindsey Graham whether the PYD and its military wing, the YPG, are aligned with the outlawed PKK terror group.
As it is, the US view seems to be:
YPG is a Kurdish movement.
There's another unrelated Kurdish movement (PKK) that happens to have similar goals and thus same alignment, but is (allegedly, and disputed) a terrorist one.
Their interests and end goals align - but that's the extent of their relationship as evidenced in the source.
As such, there's no reason for US not to support YPG - the fact that unrelated organization that shares similar goals resorts to terrorist tactics is 100% irrelevant.
The actual, direct answer as to "why" is "because they are the only ones around who are left to fight ISIL and aren't AQ offshoot", I guess. As Wikipedia notes:
Even though the U.S. continued with providing effective close air support to the YPG, it also strictly adhered to a policy that sought to prevent the YPG from acquiring more independent military capabilities that could one day become dangerous to the U.S. ally, Turkey. The U.S. started to deviate from this policy towards the YPG at about the same time as the dramatic elimination of its proxy the New Syrian Forces in September 2015
P.S. Less relevantly, everyone supports someone terrorist-"aligned" entities according to the stated degree of "alignment", US included. US supports FATEH despite it sharing same goals as Hamas terrorists. Turkey itself - whose viewpoint this question is based on - openly supports Hamas in the first place. Most of American Irish supported and still do Sinn Fein, despite its alignment with IRA terrorists.