Sony Xperia has an inbuilt feature of App Start on starting any function like battery charge, headset / headphone connected etc.
For the first time when you start any function (example battery charge), xperia will ask you to select a program to start automatically with this function.
Alarm will automatically start when you plugin battery charger.
I find this function very annoying. Here is how you can disable this feature on sony xperia phones.
Tap LiveWare Manager in apps list.
Tap on the function for which you want to disable / enable / change start-up app.
On next page, you can enable / disable start-up app for this application. You can also change / add / remove start-up app.