What are some interesting examples of flat projective maps $f : X \to Y$ between smooth varieties such that the discriminant locus $$ \Delta = \{ y \in Y \mid X_y \text{ is singular} \} \subset Y $$ has a component of codimension $\ge 2$?
I am particularly interested in an example with $Y$ a smooth proper surface and $\Delta$ a finite collection of points.
When $X$ is not assumed to be smooth, some examples are given in this stacks project blog post.