I had a cable like that as I prefer to have extra chargers at my workplace. They works fine. Cheaper than buying a magsafe 2 charger. I was using an Anker 735 so that I could charge my MBP and iPhone at the same time.
By the way, I bought my USB-C to Magsafe2 cable from a local electronic store. Not from Amazon.