I do remember hearing stories from my dad and grandpa that back in the day you could order a car and then have a dealer toss in different engine for you. How accurate that is, I don't know. Never tried it myself. Might see if they'll stuff a 572 into a GMC Sierra though the next time I'm in the market
Prior to 1971 dealers would do that if you were willing to pay for it. Starting in 1971 they were prohibited from doing it by the EPA, which was created to administer the Clean Air Act. EVERY car that is sold as new in the United States must meet EPA emission standards. Part of those standards is a "certification", or proof that the car WILL meet the standards under a set of specified operating conditions. The certifications are done by the manufacturer. The factory will NOT deviate from the certified engine/transmission combinations. Any dealer who would stick a non-certified engine into a car is subject to Federal sanctions, including prison time. Needless to say it's also grounds for the manufacturer to yank their franchise.
Prior to 1970 you had cars that were really tweaked up by the dealers after they rolled in on the transport from the factory. Those are the famed Royal Bobcats and Yenkos. Starting in 1971 it didn't NOT happen any more. Anyone who makes a claim to the contrary is feeding you a line of BS. No dealer in their right mind would do such a thing and have their name attached to it in any way, shape, or fashion.