In its course through the portafilter, water will follow the path of least resistance. If the puck isn’t level or secure, this path will be crooked and your espresso won’t pour from the centre in a single stream. To fix it either:

Ensure even distribution / Ensure level tamp