My experience is that sealer before stain is a handy trick where you're staining end grain, particularly soft woods where the end grain really soaks up the stain. Using a sealer on the end grain before staining helps even out the final product.