Afaik, in the Lockheed case, twin tails were a fallback to address inadequate fin area.
There are some claims that the military liked twin tails because it gave a clear view behind the aircraft, so hostiles had no place to hide. The B25 might be an example of that, no tail gun but an upper turret that could fire straight back. However, I've not seen any designer memoirs that mention that.