Tried to become a philosophy professor but couldn't get funding for my PhD - needed another 5% on my grades to get a distinction at MSc level to achieve that.
While studying philosophy I'd got interested in FOSS and Linux so I was vaguely aware that I found computers interesting. It turned out there was Scottish government funding for doing a MSc in Computing without needing to have done a relevant undergrad (Computer Science would have required a related UG degree).
Became a dev after doing the MSc Computing. Was a junior for 1 year then left that company and moved to another one at mid-level, where I realised I enjoyed the data related tasks. Promoted to senior after 3 years there. Also became aware Data Engineers got paid more than regular engineers.
Moved to my current company as a mid-level Data Engineer and recently became a Senior Data Engineer. Not 100% sure how it all happened given I've never been particularly good at maths however philosophy has a lot of problem solving/discrete mathematics type puzzles involved so that probably helped.