Similar to BUG-000114646 (Add Join in ArcGIS Pro yields the wrong data when input as view or layer with a query), Join Field is yielding the wrong data when the inputted join table is a layer with a query. Instead of joining from the subset of data in the query, it is joining the first value from the whole table. A temporary workaround is to export the queried layer into a new feature class and re-run the join, but it should be able to join from the queried table directly.
Your workaround of making a standalone subsample prior to the join would have been my preference to begin with. It compartmentalizes steps so they can be easily replicated.