One important factor is the mass of the components. Smaller, lighter components and shorter strokes allow higher RPMs. Given equal RPMs, an engine with a bigger stroke will put higher stresses on the components, which means they need to be stronger, which means they need to be heavier, which increases the stress even more.
Motorcycle engines tend to have smaller and lighter parts than car engines, and while this limits their maximum throughput, it allows for higher RPMs, which allows for more power.
Cars weigh more, so they need more torque at lower RPMs, and a heavier engine is less of an issue since the whole vehicle already weighs a lot. Motorcycles are smaller and lighter, so getting more power from a smaller engine generally makes more sense than putting a big heavy one in (although that does not prevent people from doing so.)
It's fundamentally a tradeoff, and which is best depends on application.
Big diesel engines have really long strokes and produce peak power at lower RPMs. Ship diesels have pistons the size of cars, and output their peak power at hundreds of RPMs instead of thousands.
RPMs vs street speed is of course dependent on gearing primarily, and even two cars probably don't have the same speed at the same RPMs.