If you over-beat the eggs, or beat the butter and sugar too fast, or added too much baking powder, the cake can rise too much and flow over the edges of the pan. Solution - Reduce the mixing time and don't use high speed to mix the ingredients. If you prefer to use baking powder, consider using a 9 x 5 inch loaf pan, instead of a 8 x 4 inch loaf pan.