Getting two different wheels, even with "identical" cassettes, to work flawlessly is partially a matter of luck. All cassettes and hubs have manufacturing tolerances that can add up to the point where a small amount of adjustment will be needed.
I recently overhauled one bike and replaced the worn Shimano 9-speed cassette and chain with identical new parts. I had to do a slight amount of tweaking of the cable tension and high limit screw to maintain the shifting quality.