Since the pain is associated with injury or compression of the sciatic nerve, and follows the path of the sciatic nerve, it makes sense to name it sciatica.
The sciatic nerve then passes beneath the piriformis muscle, and through the greater sciatic foramen, which is an opening formed by the pelvic bone, sacrospinous and sacrotuberous ligaments.
The piriformis muscle and sciatic nerve are very close to each other, so, if the piriformis muscle gets irritated, it can cause muscle inflammation or muscle spasms that can compress the sciatic nerve.