Kevin23 in part asked;
Something to me doesn't make sense how this whole plot, why would those who oversaw this send packages that looked like they were bound to attract attention from a place like Yemen to a potential high-profile target like a synagogue in the United States, especially given the security employed now and days as well the knowledge about mail-related deliveries both of the international and domestic postal and air carrier system?
I suspect that the bomb makers expected their devices to be undetected and exploit the commercial imperative of the international air freight system. Plus the use by others for illegal purposes. Once in the system, unless there are built-in additional search factors, they were confident the package(s) would reach the USA, if not the last point before delivery - when the human factor might ask Yemen to a synagogue?

It is noteworthy that the item was placed into the air freight system normally in the Yemen, a sign of a lack of capability and confidence that overland movement was not available. Imagine the impact of discovery in KSA or a "rogue" package placed in the system by an insider.

I have no expertise in bombs, but am sceptical the device(s) were meant to detonate in-flight. Nor would an explosion in a hub be a gain.

They saw an opportunity, had a working device and took a chance.