i noticed this kind of behavior myself right from the off, but I know exactly what you mean they do choose the werdest paths.
I noticed it when on one map a few were just disapearing off the map after ships under attack warning, i was baffled so i went back and watched em, they were back tracking through explored space and ging straight through a gravity well that was known to be a pirate base.
In short yeah they've always been a bit dumb in this regard lol It does make sense though because all ships, once assigned either user defined or automatic destination, are programmed to find the quickest route to their destination.