No theory practitioner would advise you do as these great artists did, but the brilliance of their songs speak for themselves ...
If you're good at figuring out chords by ear, but sometimes your ears just aren't advanced enough to do it, maybe it's because you lack knowledge about secondary dominants and this little music theory ...