I agree with Superman that there generally is no ulterior motive. Most kids I know that start smoking aren't doing it because they hate their parents or they are crying out for help or something, but because they see other people doing it, it looks cool, its something else to have in common with your friends, and it feels good. Its pleasureful, you know? I do not smoke and have never been a smoker, but I have smoked a few cigarettes throughout my life (mostly out of curiosity, really) and I can see why people like them and are addicted to them, I even kind of enjoyed the few that I tried. What kid wouldn't be drawn to something that feels nice and is cool to do with your friends? I truely think that it is as simple as that, so don't put too much thought into it.
As for what to do, I wouldn't go crazy as sadly he is going to do what he wants behind your back most of the time anyway, but I would do my best to stop him if you think you can. Like others have said, I would educate the crap out of him. Obviously the school system kind of drills it into their heads, but still do some of it on your own too. Try to make him watch a bunch of youtube videos on the effects of smoking on the body, take him to the doctor for a regular physical or what have you and ask the doctor to tell him all the negativity of smoking, same with the dentist. It sounds like a real pain and a lot of going out of your way, but its totally worth it because WOW smoking is so bad for you haha plus its illegal for him to be doing it. Another thing would be to threaten him with the fact that whoever he is asking to buy his cigarettes for him can go to jail, because it is completely illegal to buy cigarettes for a minor (like Fo7 said, that's actually really unlikely, but he doesn't have to know that). You can even pull up an article off of the internet explaining the details of this to prove it to him, or if you're brave you can take him to the station to have an officer explain it to him.
I also think that he should not have an allowance if he is spending his money on cigarettes (the price they are now, I highly doubt his friends are handing out freebies). Sadly, at this point, allowance will kind of enable him, you know? I don't know about his school, but the schools in my area all have individual "lunch accounts" for every kid and you can write a check to put lunch money in it, it doesn't just have to be cash in his hand to tempt him if you can do that. That would take care of lunch, and honestly other than that you could probably personally buy him anything else he needs for a while until he figures things out (hopefully). I'm sure he wants money for a pop machine or something too, but that maybe might just have to be a consequence for a little bit (its not that bad, really haha). Last but not least, honestly I would probably ground him for a bit. A few days to a week possibly, and this being because he is getting cigarettes from someone that he's hanging out with, and since I'm sure he wont just point fingers so you can filter out his friends, then maybe he needs a little time away from them. That's just my opinion though.
I think these are just the steps I would take though, they might sound kind of harsh but cigarettes kill about 5.8 million people a year. That fact alone is enough to scare the crap out of me if I found out my kid was smoking. My husband smokes, and I wish he would quit but its not just that easy at least not at this point in his life. He is thinking about trying the e-cigs (which is always a very very very last option if you can't keep your son away from regular cigarettes, as they still give you the good feeling and they're actually kind of cool lol but they don't have any of the harmful effects that regular cigarettes do).
My husband started smoking when he was about 12, and when his grandma found out (she was the first to notice, and he lived all over the place throughout his life) she made him and his cousin (who was also doing it) smoke a cigar, thinking it would make them sick and turn them off. On the contrary, they both loved it and it didn't phase them a bit. :/ Sadly, once DH's mom found out, she allowed it 100% and even bought his cigarettes for him from then on until he was old enough to do it himself. -sigh- Crazy!
You can't get real mad and flip out or go crazy (which I would feel like doing lol) because that might make it worse and it might not even matter, so it would probably do more harm than good. You don't seem like that type anyway though. I do think that some serious steps could be taken though, and all with the clear intentions of trying to better his life and keep him from hurting himself. I would make that very clear. That you are only worried about his health and how bad smoking is for him. And not to focus on anything related to how mad it makes you or how much you dislike it.
Either way, I'm so sorry you have to go through this and I hope I never have to!
Good luck and I really hope he uses his brain and sees the light.