There are two issues here: 1) The tool suggests you can limit by library and checkout date but in fact, the library is not the patrons' library but the library the items were issued at. This is not clear from the UI. 2) When it comes to the actual anonymisation, although we've got a filtered list of Patrons by issues before X and at Library, we then delete ALL issues before X by any of the Patrons selected by the previous query, regardless of which library the checkout took place and thus we ignore the selected Library.
I think the feature should allow the Patron selection (for deletion or anonymization) in a first step (and filtering by branch should be te patrons home branch, not where the issues happened) and then proceed to a second step where you can select whether all issues (before the previously selected date) are anonymised regardless of checkout branch or whether the issues should be limited to the selected branch.. I'm not even sure if/when the second step would ever be required?