When you're not in the courtroom, you're investigating the case. i didn't mind those parts too much, but the courtroom is the most fun. But, if you don't like investigating, you might wanna skip out on AA Investigations, lol.
Yes! It does matter. And I only say that because there are a lot of references between the games which make them more enjoyable.
Ace Attorney: Phoenix Wright
Ace Attorney: Justice for All
Ace Attorney: Trials and Tribulations
Ace Attorney: Apollo Justice
Ace Attorney Investigations: Miles Edgeworth