No job is perfect. Even the most desirable "dream jobs" can lead to stressful weeks and pained nights. Those situations can lead to underperforming which then can lead to firing. However, maybe deep down that's what you wanted all along. Maybe getting fired was worth it.