Which of these sentences is better and why?
- Nearly 1 million dollars was allocated by corporations for purchase of devices in 2013.
- Nearly 1 million dollars was allocated for purchase of devices by corporations in 2013
The two of them are... the same sentence, with different parts in different places. Another example:
There's nothing wrong with what you've written as far as I can see.
As far as I can see, there's nothing wrong with what you've written.
There is no set order of words in English for a sentence like this.
/* As mentioned in the comments, 'devices' is plural, so replace 'a devices' with either 'the devices', 'some devices', or simply 'devices'. These use the definite article, indefinite article, and 'no' article respectively. */
Some other things raised. 'One million dollars' can be followed by both 'was' and 'were'. You can either refer to the 'one' set of a million dollars' or the one million 'dollars'. The 'one' takes was (as it's singular) and the 'dollars' take were, as there are multiple dollars here.
When we have a sentence in the passive voice, then the by + agent (to say who or what carries out the action) is placed in the end of the sentence.
Therefore, the correct sentence is the second one.
Nearly 1 million dollars was allocated for purchase of devices by corporations in 2013