The question mark is supposed to go outside the quote if it is not part of the quote, FYI. Same with exclamation points. Internalizing only happens with periods and commas.
We can treat it consistently, it just takes a full book-length style guide to do so. Exceptions of exceptions are a frustrating form of consistency, but they are consistent nevertheless.