This feature is new to 2018 and is called the “brush leash”
The pink brush leash is meant to serve as a guide for the Smoothing feature of the Brush Tool. Turning Smoothing down to 0% removes the pink line and restores the brush tool to the original version.
You can also turn off the brush leash in the Cursors panel of your Preferences > Cursors
You can also change the colour if you wanted to 

Edit:
Here is a 6-minute video explaining how to use it effectively and what it's actually for;
What Is That Purple Line On My Brush Tool In Photoshop CC2018? - YouTube