[TES] Empire Border Crossings

From my understanding crossing the borders is fine, but they were at war with the stormcloaks so they were arresting and killing nords entering skyrim as they assumed they were part of the stormcloak.

You were found near the leader of the stormcloaks so they just assumed you were with them. They even asked "why she we do with this one?" as if you were probably fine to leave, but they didn't want to risk it.

I could be wrong, It's been a while since I have played skyrim and I am far from a cyrodil lawyer.

It's a province simmering on civil war, where a local lord murdered the king and is building an army. The Empire is restricting travel to and from Skyrim because of the unstable climate there, until the situation is resolved.

Your question of "why was the LDB arrested" has been answered, so I'm going to elaborate on the other part. Yes, the provinces are all somewhat autonomous(Skyrim, High Rock, and Morrowind all having various "kings" or "queens" at some point in the series) which all come together to form a unified Empire and show fealty to the Emperor.