Duplicating CDs (or DVDs or books) for private use is indeed legal in France (even if the original comes from a library). The "taxe sur la copie privée" is intended to compensate for the fact that fewer copies are sold because of such private copy. It has nothing to do with piracy.