In general cost is the primary concern and SSRs tend to be bigger in size too. If you spec for SSR that can do 10A 250VAC, it will be around $50 a piece. Mechanical relays are much cheaper, probably in the order or few bucks. Optocouplers used there are also cheap.
For certain applications, typical SSRs are not applicable. E.g. RF switching.